- A type system is a restriction. A good restriction
- Think of Rust
- Type system application
- Compile time validation
- IDE intellisense
- Static analysis
- Reflection
- Compile time optimization (less relevant for Typescript)
- There is Google closure compiler (for js with js docs)
- tsconfig.json flag
- null and undefined are separate types
- operator ?? and ?=
⇒ never call methods of null again!
- literals are also types
- restrict the acceptable values
- Typeof and instanceof
- Control flow analysis
- Discriminated union
- Type guard and assert function
(Demo only as it is very long)
- TODO demo
Showcase only
Microsoft-maintained repo with types for js libraries that do not have typing
Type utilities
ts-essentials but bigger
Arithmetic and logic calculation with literal types
Functional programming but with types
- More linting rule for typescript
tsc alternative, written in C++