Typescript

TypeScript configuration, strict mode, generics, and type utilities. Use when this capability is needed.

tomevault-io Updated

File contents

TypeScript Skill

Expert assistance for TypeScript configuration and patterns.

Capabilities

  • Configure tsconfig
  • Implement strict typing
  • Create utility types
  • Handle generics
  • Design type-safe APIs

Configuration

// tsconfig.json
{
  "compilerOptions": {
    "strict": true,
    "noUncheckedIndexedAccess": true,
    "exactOptionalPropertyTypes": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true,
    "moduleResolution": "bundler",
    "esModuleInterop": true,
    "skipLibCheck": true
  }
}

Utility Types

// Extract, Omit, Pick
type UserWithoutPassword = Omit<User, 'password'>;

// Conditional types
type NonNullable<T> = T extends null | undefined ? never : T;

// Mapped types
type Readonly<T> = { readonly [P in keyof T]: T[P] };

Target Processes

  • typescript-setup
  • type-safety
  • api-design

Converted and distributed by TomeVault — claim your Tome and manage your conversions.

tomevault-io/skills-registry/tree/main/a5c-ai--babysitter--typescript commit 5462e7b879

Frequently asked questions

npx skillmds@latest add tomevault-io/typescript-9