TDungeon
ts-reset
TDungeon | ts-reset | |
---|---|---|
6 | 20 | |
1,155 | 7,588 | |
- | 0.8% | |
10.0 | 4.2 | |
over 1 year ago | about 2 months ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
TDungeon
- Books/resources to improve TypeScript knowledge
-
Is TypeScript actually worth It?
I did not write the blog post, it was just a simple infer/extends non-trivial example explained in depth, commonly used in packages like express and so forth. TDungeon [1], a game running on the TypeScript type system, really showcases how powerful the type system truly is.
Why not C#? Probably because Anders Hejlsberg [2], lead architect of C# and core developer of TypeScript, wanted something different.
[1] https://github.com/cassiozen/TDungeon
[2] https://en.wikipedia.org/wiki/Anders_Hejlsberg
- A text adventure game on TypeScript's type system
ts-reset
-
Unleashing the Power of TypeScript: Improving Standard Library Types
TypeScript's standard library contains over 1,000 instances of the any type. There are many opportunities to improve the developer experience when working with strictly typed code. One solution to avoid having to fix the standard library yourself is to use the ts-reset library. It is easy to use and only needs to be imported once in your project.
-
Why doesn't TypeScript properly type Object.keys?
You might like TS Reset: https://github.com/total-typescript/ts-reset, which fixes this particular problem. I don't personally find it to be a big issue though.
Regarding runtime type checking, if you were to write something that can handle the total space of possible TS types, you would end up with incredibly complex machinery. It would be hard to make it perform, both in terms of speed and bundle size, and it would be hard to predict. I think Zod or perhaps https://arktype.io/ which target a reasonable subset are the only way to go.
-
Javascript vs typescript
https://github.com/total-typescript/ts-reset <-- this fixes the `(string | undefined)[]` issue and a few other quirks. Obviously it's annoying to need a library to fix quirks, but better than nothing.
-
Books/resources to improve TypeScript knowledge
Dude is an actual TypeScript wizard, his ts-reset package is a must have when dealing with JSON. He was featured in the VS Code day streams to show off some introductory TypeScript concepts and my big takeaway from that stream was this VS Code extension. Just stick // ^? on the line after something and it shows the type of the line above. Amazing with Prisma.
-
Typescript really hits the middle ground between extremely rigid statically typed languages on one extreme and no types at all dynamic languages on another extreme. Best type system
Personally I quite like ts-reset to "fix" some of the std lib types - JSON.parse will now return unknown. It's then up to you to decide how you wish to parse that unknown (zod, runtypes, io-ts are all reasonable options here). Won't ever be done by TS itself, as generating runtime code is a non-goal for the project.
-
Free Next.js Boilerplate for ⚡️High-Performance⚡️ Enterprise Apps
🛠️ Extremely strict TypeScript - With ts-reset library for ultimate type safety
-
How to construct this tuple type?
Ok, answered it myself: it was a perfect use case for ts-reset: https://github.com/total-typescript/ts-reset
- A 'CSS reset' for TypeScript, improving types for common JavaScript API's
What are some alternatives?
d2-playground - An online runner to play, learn, and create with D2, the modern diagram scripting language that turns text to diagrams.
zod - TypeScript-first schema validation with static type inference
flyweight - An ORM for SQLite
ts-async-kit - the easiest API to deal with promises in Typescript. Currently, ↩️ Retrying 🏃♂️ looping & 😴 sleeping
proposal-type-annotations - ECMAScript proposal for type syntax that is erased - Stage 1
garph - Fullstack GraphQL Framework for TypeScript
Superforms - Superforms is a SvelteKit library that helps you with server-side validation and client-side display of forms.
sonner - An opinionated toast component for React.
nuxt-scheduler - Create scheduled jobs with human readable time settings
suspense - Utilities for working with React Suspense
concurrent.js - Non-blocking Concurrent Computation for JavaScript RTEs (Web Browsers, Node.js & Deno & Bun)
aylett.co.uk - My personal website