Type Modifiers
Learning TypeScript's Type Modifiers chapter covers using type modifiers to take existing objects and/or types and turn them into new types:
- Top types: the highly permissive
anyand the highly restrictiveunknown - Type operators: using
keyofto grab the keys of a type and/ortypeofto grab the type of a value - Using—and when not to use—type assertions to sneakily change the type of a value
- Narrowing types using
as constassertions