Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 1.14 KB

README.md

File metadata and controls

36 lines (26 loc) · 1.14 KB

5 Minutes or Less: TypeScript/JavaScript patterns and features

Patterns and features of TypeScript and JavaScript, demystified in less than 5 minutes each

This is a collection of briefly presented concepts, features, and patterns that I find interesting in TS/JS.

Five Minutes or Less

Content

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

Running the code

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.