All skills

TypeScript 6+ guidance for project development, tsconfig configuration, diagnostics, module resolution, deprecations, and modern standard-library typings. Use when building or maintaining TypeScript 6+ projects, debugging compiler behavior, or working through TS 6-specific defaults and tooling such as `#/` subpath imports, `ignoreDeprecations`, `RegExp.escape`, `Temporal`, and `--stableTypeOrdering`. Triggers on typescript 6, ts 6, stableTypeOrdering, ignoreDeprecations, types array, noUncheckedSideEffectImports, baseUrl deprecated, moduleResolution node deprecated, and subpath imports.

Use this Skill: https://skilld.dev/gh/nodnarbnitram/claude-code-extensions/typescript-v6

This session only. Nothing lands on disk.

referencestype-patterns-reference.md

≈592 tokens on demand. Your agent reads this file only when SKILL.md points to it.

TypeScript 6+ Type Patterns Reference

These patterns are not new in TS 6, but they are especially useful in TypeScript 6+ projects when the codebase exposes unclear contracts, widened literals, or incomplete unions.

satisfies for Config and Option Objects

const compilerMode = {
  moduleResolution: 'bundler',
  strict: true,
} satisfies {
  moduleResolution: 'bundler' | 'nodenext';
  strict: boolean;
};

Use this when you want validation without widening away the useful literal types.

Exhaustive Union Handling

type ResolutionMode = 'bundler' | 'nodenext' | 'preserve';

function describeMode(mode: ResolutionMode) {
  switch (mode) {
    case 'bundler':
      return 'bundled app';
    case 'nodenext':
      return 'node-style runtime';
    case 'preserve':
      return 'mixed emit strategy';
    default: {
      const exhaustive: never = mode;
      return exhaustive;
    }
  }
}

Use this when config, runtime, or state unions change and you need the compiler to prove coverage.

Assertion Functions

function assertNodeTypes(types: string[] | undefined): asserts types is string[] {
  if (!types || !types.includes('node')) {
    throw new Error('Expected Node types to be configured');
  }
}

Use assertion functions when migration checks need to narrow unknown or optional data from config readers, CLI inputs, or JSON loading.

Branded IDs and Nominal Separation

type Brand<T, B extends string> = T & { readonly __brand: B };
type PackageName = Brand<string, 'PackageName'>;

This is useful when migration tooling or repo scripts pass around multiple plain strings that should not be mixed up.

Result Pattern for Type-Safe Operations

type Result<T, E = Error> =
  | { success: true; value: T }
  | { success: false; error: E };

Use this when upgrade helpers or config loaders need explicit success/error control flow instead of exceptions.

Quick Reference

Pattern Use When
satisfies config or option objects should stay literal-precise
exhaustive never unions changed and every branch must be handled
assertion functions optional/unknown values must be narrowed safely
branded types plain strings/IDs should not be mixed accidentally
Result<T, E> upgrade helpers need explicit typed success/failure

Source: SKILL.md on GitHub

No alerts5mo3 checks · Risk SAFE
  • Gen Agent Trust Hub5mo

    This skill provides safe and comprehensive guidance for configuring and migrating projects to TypeScript 6. It utilizes standard compiler tools and references official documentation without any detected security risks or malicious patterns.

  • Socket5mo

    No alerts

  • Snyk5mo

    Risk: LOW · No issues

Signed by skilld at aabed46. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 6 months ago
version
1.0.0
metadata
{
  "author": "Brandon Martin"
}

README badge

README badge for nodnarbnitram/claude-code-extensions/typescript-v6