ref-sp-js-typescriptlisted
Install: claude install-skill swiftpostlabs/agentic-tools
# TypeScript
## Purpose
Provide portable TypeScript defaults that keep types honest, runtime boundaries explicit, and code readable under strict settings.
## When to use this skill
- Writing or refactoring TypeScript modules or scripts.
- Deciding how to model states, responses, and shared types.
- Reviewing TypeScript config and type-checking strictness.
- Handling unknown external data safely.
## Scope Boundaries
- Use this skill for strict TypeScript design, runtime boundaries, and package-level structure.
- Use `ref-sp-js-react` when the main question is about React component structure, hooks, client-side state ownership, or React-specific dependency choices.
- Use `ref-sp-js-next` when the main question is about Next.js framework structure, App Router, or Next-specific integrations.
- Use `ref-sp-js-javascript` when the code intentionally stays in plain JavaScript with JSDoc rather than full TypeScript.
- Use `ref-sp-dev-coding-patterns` for language-agnostic naming, comments, CLI ergonomics, and testing defaults.
- Use `ref-sp-dev-projects-architecture` for generic feature-boundary or shared-utility decisions that are not TypeScript-specific.
## Defaults
- Prefer strict mode and keep it strict.
- Prefer `unknown` plus narrowing over `any`.
- Prefer discriminated unions for stateful variants.
- Prefer explicit runtime validation at trust boundaries.
- Prefer inferred function return types by default when TypeScript can express the result cleanly from the implemen