TypeScriptTips

Make bugs impossible.
One TypeScript tip at a time.

I like the tricks :) – Kasia

Use descriptive values

Prefer enums instead of booleans to make code descriptive and extendable.

order.isDoing = true
type Status = 'todo' | 'doing' | 'done'
order.status = 'doing'