typescript-conventions
Framework-neutral TypeScript conventions covering strictness and tsconfig inheritance from a shared base config, unknown over any, non-null assertions, @ts-expect-error with a reason, type vs interface, no enums with an as const alternative, import type, naming, discriminated unions, type guards, satisfies, utility types, schema-derived types (Zod), API response typing, catch clause errors, module augmentation, generics, branded types, and where types live. Load when writing or reviewing any TypeScript, defining shared types, or configuring tsconfig.
Pinned to revision c74eff4a9f08, so it is the text this page describes rather than whatever the author pushed since.
Files
Every link opens the file at its source, pinned to the revision this page describes.