sb-typescript

Installation
SKILL.md

Sunbytes TypeScript

When to apply

Trigger on any work in .ts / .tsx files, or when the user asks to write or edit TypeScript. This is the base skill — sb-react, sb-nextjs, and sb-nestjs build on it and should be loaded alongside when the project matches.

Core typing

  • Strict mode always. tsconfig has strict: true, noUncheckedIndexedAccess: true, exactOptionalPropertyTypes: true, noImplicitOverride: true.
  • No any. Use unknown and narrow with type guards. If any is unavoidable, leave a one-line comment explaining why.
  • No non-null assertions (!) and no as casts except when narrowing from unknown after a guard, or for as const.
  • type over interface for new code. Use interface only when extending classes or library shapes that require it (declaration merging).
  • Named exports only. No default exports — they break refactoring tools and autocomplete.
  • No enums. Use union literals (type Status = 'pending' | 'done') or as const objects with a derived value type.
  • readonly by default for arrays and object properties that aren't mutated. ReadonlyArray<T> for inputs.

Async

Installs
7
First Seen
Jun 5, 2026