Skip to content

Latest commit

 

History

History
21 lines (18 loc) · 898 Bytes

operators.md

File metadata and controls

21 lines (18 loc) · 898 Bytes
id title sidebar_label
operators
Troubleshooting Handbook: Operators
Operators
  • typeof and instanceof: type query used for refinement
  • keyof: get keys of an object
  • O[K]: property lookup
  • [K in O]: mapped types
  • + or - or readonly or ?: addition and subtraction and readonly and optional modifiers
  • x ? Y : Z: Conditional types for generic types, type aliases, function parameter types
  • !: Nonnull assertion for nullable types
  • =: Generic type parameter default for generic types
  • as: type assertion
  • is: type guard for function return types

Conditional Types are a difficult topic to get around so here are some extra resources: