This is a collection of briefly presented concepts, features, and patterns that I find interesting in TS/JS.
Current contents:
- TypeScript 5.0 decorators
- Index signatures
- Maps and sets
- Metaprogramming (Reflect API and Proxy)
- Nullish coalescing
- Static factory function
- Utility types:
- Exclude
- Omit
- Parameters
- Partial
- Pick
- Required
- Return type
You can install the things with npm install
and then just go at each file with npx ts-node src/{filename}.ts
.
Or, if you're lazy, you can also copy the individual TS file's contents into the TypeScript playground if you want to avoid cloning and installing anything at all.