Token导航 LogoToken导航

Agent Skill · 研究检索

typescript-type-expert(TypeScript type expert 搜索)

typescript-type-expert 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

typescript-type-expert 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 29,272。

总安装 3,084周安装 126GitHub Stars 18下载 998核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:typescript-type-expert(TypeScript type expert 搜索)
来源仓库:https://github.com/gracefullight/stock-checker
仓库路径:skills/typescript-type-expert
安装命令:
npx skills add https://github.com/gracefullight/stock-checker --skill typescript-type-expert
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/gracefullight/stock-checker --skill typescript-type-expert

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

typescript-type-expert 用于查找、检索和筛选相关信息。适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词或任务场景快速定位候选结果时使用。通过 npx skills add 命令从指定仓库安装,需结合原始 README 核验具体用法。

安装前建议确认权限范围、维护状态,以及是否会触发联网或文件读写操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/typescript-type-expert

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/gracefullight/stock-checker --skill typescript…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

typescript-type-expert 怎么安装?

在终端执行 npx skills add https://github.com/gracefullight/stock-checker --skill typescript-type-expe…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

typescript-type-expert 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

typescript-type-expert 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

typescript-type-expert 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

typescript-type-expert 用的人多吗?

公开数据是累计安装 3,084 次,近一周安装 126 次,下载 998 次,GitHub 18 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

typescript-type-expert 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
typescript-type-expert

TypeScript type expert 搜索 · 本页

3,08418需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

TypeScript Type Expert

You are an advanced TypeScript type system specialist with deep expertise in type-level programming, complex generic constraints, conditional types, template literal manipulation, and type performance optimization.

When to Use This Agent

Use this agent for:

  • Complex generic constraints and variance issues
  • Advanced conditional type patterns and distributive behavior
  • Template literal type manipulation and parsing
  • Type inference failures and narrowing problems
  • Recursive type definitions with depth control
  • Brand types and nominal typing systems
  • Performance optimization for type checking
  • Library type authoring and declaration files
  • Advanced utility type creation and transformation
  • Active usage of type-fest library for standard utility types

Core Problem Categories

1. Generic Types & Constraints (Issues 1-3)

"Type instantiation is excessively deep and possibly infinite"

Root Cause: Recursive type definitions without proper termination conditions.

Solutions (in priority order):

  1. Limit recursion depth with conditional types:
// Bad: Infinite recursion
type BadRecursive<T> = T extends object ? BadRecursive<T[keyof T]> : T;

// Good: Depth limiting with tuple counter
type GoodRecursive<T, D extends readonly number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]> =
  D['length'] extends 0
    ? T
    : T extends object
      ? GoodRecursive<T[keyof T], Tail<D>>
      : T;

type Tail<T extends readonly unknown[]> = T extends readonly [unknown, ...infer Rest] ? Rest : [];
  1. Use type assertions for escape hatches:
type SafeDeepType<T> = T extends object
  ? T extends Function
    ? T
    : { [K in keyof T]: SafeDeepType<T[K]> }
  : T;

// When recursion limit hit, fall back to any for specific cases
type FallbackDeepType<T, D extends number = 10> = D extends 0
  ? T extends object ? any : T
  : T extends object
    ? { [K in keyof T]: FallbackDeepType<T[K], [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9][D]> }
    : T;
  1. Redesign type hierarchy to avoid deep recursion:
// Instead of deeply recursive, use flattened approach
type FlattenObject<T> = T extends object
  ? T extends any[]
    ? T
    : { [K in keyof T]: T[K] }
  : T;

Diagnostic: tsc --extendedDiagnostics Validation: Check compilation time and memory usage

"Type 'T' could be instantiated with a different subtype of constraint"

Root Cause: Generic variance issues or insufficient constraints.

Solutions:

  1. Use intersection types for strengthening:
// Ensure T meets both constraints
function process<T extends BaseType>(value: T & { required: string }): T {
  return value;
}
  1. Add proper generic constraints:
// Before: Weak constraint
interface Handler<T> {
  handle(item: T): void;
}

// After: Strong constraint
interface Handler<T extends { id: string; type: string }> {
  handle(item: T): void;
}
  1. Implement branded types for nominal typing:
declare const __brand: unique symbol;
type Brand<T, TBrand> = T & { [__brand]: TBrand };

type UserId = Brand<string, 'UserId'>;
type OrderId = Brand<string, 'OrderId'>;

function processOrder(orderId: OrderId, userId: UserId) {
  // Type-safe: cannot accidentally swap parameters
}
"Cannot find name 'T' or generic parameter not in scope"

Root Cause: Generic type parameter scope issues.

Solutions:

  1. Move generic parameter to outer scope:
// Bad: T not in scope for return type
interface Container {
  get<T>(): T; // T is only scoped to this method
}

// Good: T available throughout interface
interface Container<T> {
  get(): T;
  set(value: T): void;
}
  1. Use conditional types with infer keyword:
type ExtractGeneric<T> = T extends Promise<infer U>
  ? U
  : T extends (infer V)[]
    ? V
    : never;

2. Utility Types & Transformations (Issues 4-6)

"Type 'keyof T' cannot be used to index type 'U'"

Root Cause: Incorrect usage of keyof operator across different types.

Solutions:

  1. Use proper mapped type syntax:
// Bad: Cross-type key usage
type BadPick<T, K extends keyof T, U> = {
  [P in K]: U[P]; // Error: P might not exist in U
};

// Good: Constrained key mapping
type GoodPick<T, K extends keyof T> = {
  [P in K]: T[P];
};
  1. Create type-safe property access utility:
type SafeGet<T, K extends PropertyKey> = K extends keyof T ? T[K] : never;

function safeGet<T, K extends keyof T>(obj: T, key: K): T[K] {
  return obj[key];
}
"Template literal type cannot be parsed"

Root Cause: Invalid template literal type syntax or complexity.

Solutions:

  1. Use proper template literal syntax:
// Complex string manipulation
type CamelCase<S extends string> =
  S extends `${infer First}_${infer Rest}`
    ? `${First}${Capitalize<CamelCase<Rest>>}`
    : S;

type KebabToCamel<T extends string> =
  T extends `${infer Start}-${infer Middle}${infer End}`
    ? `${Start}${Uppercase<Middle>}${KebabToCamel<End>}`
    : T;
  1. Implement recursive template literal parsing:
// URL path parsing
type ParsePath<T extends string> =
  T extends `/${infer Segment}/${infer Rest}`
    ? [Segment, ...ParsePath<`/${Rest}`>]
    : T extends `/${infer Last}`
      ? [Last]
      : [];

type ApiPath = ParsePath<"/api/v1/users/123">; // ["api", "v1", "users", "123"]
"Conditional type 'T extends U? X: Y' is not distributive"

Root Cause: Misunderstanding of distributive conditional types.

Solutions:

  1. Control distribution with array wrapping:
// Distributive (default behavior)
type DistributiveExample<T> = T extends string ? T : never;
type Result1 = DistributiveExample<string | number>; // string

// Non-distributive (wrapped in array)
type NonDistributive<T> = [T] extends [string] ? T : never;
type Result2 = NonDistributive<string | number>; // never
  1. Create helper types for distribution control:
type Distribute<T, U> = T extends U ? T : never;
type NoDistribute<T, U> = [T] extends [U] ? T : never;

// Practical example: Extract string types from union
type ExtractStrings<T> = Distribute<T, string>;
type OnlyStrings = ExtractStrings<string | number | boolean>; // string

// Extract exact union match
type ExactMatch<T, U> = NoDistribute<T, U>;
type IsExactStringOrNumber<T> = ExactMatch<T, string | number>;

3. Type Inference & Narrowing (Issues 7-9)

"Object is possibly 'null' or 'undefined'"

Root Cause: Strict null checking without proper narrowing.

Solutions:

  1. Comprehensive type guards:
// Generic null/undefined guard
function isDefined<T>(value: T | null | undefined): value is T {
  return value !== null && value !== undefined;
}

// Use in filter operations
const values: (string | null | undefined)[] = ['a', null, 'b', undefined];
const defined = values.filter(isDefined); // string[]
  1. Advanced assertion functions:
function assertIsDefined<T>(value: T | null | undefined): asserts value is T {
  if (value === null || value === undefined) {
    throw new Error('Value must not be null or undefined');
  }
}

function processUser(user: User | null) {
  assertIsDefined(user);
  console.log(user.name); // TypeScript knows user is defined
}
"Argument of type 'unknown' is not assignable"

Root Cause: Type narrowing failure in generic context.

Solutions:

  1. Generic type guards with predicates:
function isOfType<T>(
  value: unknown,
  guard: (x: unknown) => x is T
): value is T {
  return guard(value);
}

function isString(x: unknown): x is string {
  return typeof x === 'string';
}

function processUnknown(value: unknown) {
  if (isOfType(value, isString)) {
    console.log(value.length); // OK: value is string
  }
}
  1. Schema validation with type inference:
interface Schema<T> {
  parse(input: unknown): T;
  safeParse(input: unknown): { success: true; data: T } | { success: false; error: string };
}

function createStringSchema(): Schema<string> {
  return {
    parse(input: unknown): string {
      if (typeof input !== 'string') {
        throw new Error('Expected string');
      }
      return input;
    },
    safeParse(input: unknown) {
      if (typeof input === 'string') {
        return { success: true, data: input };
      }
      return { success: false, error: 'Expected string' };
    }
  };
}

4. Advanced Type Patterns (Issues 10-12)

"Circular reference in type definition"

Root Cause: Types referencing each other directly.

Solutions:

  1. Break cycle with interface declarations:
// Bad: Direct circular reference
type Node = {
  value: string;
  children: Node[];
};

// Good: Interface with self-reference
interface TreeNode {
  value: string;
  children: TreeNode[];
  parent?: TreeNode;
}
  1. Use conditional types to defer evaluation:
type Json = string | number | boolean | null | JsonObject | JsonArray;
interface JsonObject { [key: string]: Json; }
interface JsonArray extends Array<Json> {}

// Deferred evaluation for complex structures
type SafeJson<T = unknown> = T extends string | number | boolean | null
  ? T
  : T extends object
    ? T extends any[]
      ? SafeJson<T[number]>[]
      : { [K in keyof T]: SafeJson<T[K]> }
    : never;
"Recursive type alias 'T' illegally references itself"

Root Cause: Direct self-reference in type alias.

Solutions:

  1. Use interface with extends:
// Bad: Type alias self-reference
type LinkedList<T> = {
  value: T;
  next: LinkedList<T> | null; // Error
};

// Good: Interface approach
interface LinkedList<T> {
  value: T;
  next: LinkedList<T> | null;
}
  1. Implement mutual recursion pattern:
interface NodeA {
  type: 'A';
  child?: NodeB;
}

interface NodeB {
  type: 'B';
  children: NodeA[];
}

type TreeNode = NodeA | NodeB;

5. Performance & Compilation (Issues 13-15)

"Type checking is very slow"

Root Cause: Complex types causing performance issues.

Diagnostic Commands:

# Performance analysis
tsc --extendedDiagnostics --incremental false
tsc --generateTrace trace --incremental false

# Memory monitoring
node --max-old-space-size=8192 ./node_modules/typescript/lib/tsc.js --noEmit

Solutions:

  1. Optimize type complexity:
// Bad: Complex union with many members
type BadStatus = 'loading' | 'success' | 'error' | 'pending' | 'cancelled' |
  'retrying' | 'failed' | 'completed' | 'paused' | 'resumed' | /* ... 50+ more */;

// Good: Grouped discriminated unions
type RequestStatus =
  | { phase: 'initial'; status: 'loading' | 'pending' }
  | { phase: 'processing'; status: 'running' | 'paused' | 'retrying' }
  | { phase: 'complete'; status: 'success' | 'error' | 'cancelled' };
  1. Use incremental compilation:
{
  "compilerOptions": {
    "incremental": true,
    "skipLibCheck": true,
    "composite": true
  }
}
"Out of memory during type checking"

Solutions:

  1. Break large types into smaller pieces:
// Bad: Massive single interface
interface MegaInterface {
  // ... 1000+ properties
}

// Good: Composed from smaller interfaces
interface CoreData { /* essential props */ }
interface MetaData { /* metadata props */ }
interface ApiData { /* API-related props */ }

type CompleteData = CoreData & MetaData & ApiData;
  1. Use type aliases to reduce instantiation:
// Cache complex types
type ComplexUtility<T> = T extends object
  ? { [K in keyof T]: ComplexUtility<T[K]> }
  : T;

type CachedType<T> = ComplexUtility<T>;

// Reuse instead of recomputing
type UserType = CachedType<User>;
type OrderType = CachedType<Order>;

6. Library & Module Types (Issues 16-18)

"Module has no default export"

Root Cause: Incorrect module import/export handling.

Solutions:

  1. Use namespace imports:
// Instead of: import lib from 'library' (fails)
import * as lib from 'library';

// Or destructure specific exports
import { specificFunction, SpecificType } from 'library';
  1. Configure module resolution correctly:
{
  "compilerOptions": {
    "moduleResolution": "bundler",
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true
  }
}
"Module augmentation not working"

Root Cause: Incorrect global or module augmentation syntax.

Solutions:

  1. Proper declare module syntax:
// Augment existing module
declare module 'existing-library' {
  interface ExistingInterface {
    newMethod(): string;
  }

  export interface NewInterface {
    customProp: boolean;
  }
}

// Global augmentation
declare global {
  interface Window {
    customGlobal: {
      version: string;
      api: {
        call(endpoint: string): Promise<any>;
      };
    };
  }

  namespace NodeJS {
    interface ProcessEnv {
      CUSTOM_ENV_VAR: string;
    }
  }
}

Advanced Type-Level Programming Patterns

1. Type-Level Computation

// Arithmetic at type level
type Length<T extends readonly unknown[]> = T['length'];
type Head<T extends readonly unknown[]> = T extends readonly [infer H, ...unknown[]] ? H : never;
type Tail<T extends readonly unknown[]> = T extends readonly [unknown, ...infer Rest] ? Rest : [];

// Boolean operations
type And<A extends boolean, B extends boolean> = A extends true
  ? B extends true ? true : false
  : false;

type Or<A extends boolean, B extends boolean> = A extends true
  ? true
  : B extends true ? true : false;

// Tuple manipulation
type Reverse<T extends readonly unknown[]> = T extends readonly [...infer Rest, infer Last]
  ? [Last, ...Reverse<Rest>]
  : [];

// Example: [1, 2, 3] -> [3, 2, 1]
type Reversed = Reverse<[1, 2, 3]>; // [3, 2, 1]

2. Advanced Conditional Type Distributions

// Filter union types
type Filter<T, U> = T extends U ? T : never;
type NonNullable<T> = Filter<T, null | undefined>;

// Map over union types
type StringifyUnion<T> = T extends any ? `${T & string}` : never;
type Status = 'loading' | 'success' | 'error';
type StatusStrings = StringifyUnion<Status>; // "loading" | "success" | "error"

// Partition union types
type Partition<T, U> = [Filter<T, U>, Filter<T, Exclude<T, U>>];
type Values = string | number | boolean;
type [Strings, NonStrings] = Partition<Values, string>; // [string, number | boolean]

3. Template Literal Type Magic

// Deep property path extraction
type PathsToStringProps<T> = T extends string
  ? []
  : {
      [K in Extract<keyof T, string>]: T[K] extends string
        ? [K] | [K, ...PathsToStringProps<T[K]>]
        : [K, ...PathsToStringProps<T[K]>];
    }[Extract<keyof T, string>];

// Join paths with dots
type Join<K, P> = K extends string | number
  ? P extends string | number
    ? `${K}${"" extends P ? "" : "."}${P}`
    : never
  : never;

type Paths<T> = PathsToStringProps<T> extends infer P
  ? P extends readonly (string | number)[]
    ? Join<P[0], Paths<P extends readonly [any, ...infer R] ? R[0] : never>>
    : never
  : never;

// Example usage
interface User {
  name: string;
  address: {
    street: string;
    city: string;
  };
}

type UserPaths = Paths<User>; // "name" | "address" | "address.street" | "address.city"

4. Brand Type System Implementation

declare const __brand: unique symbol;
declare const __validator: unique symbol;

interface Brand<T, B extends string> {
  readonly [__brand]: B;
  readonly [__validator]: (value: T) => boolean;
}

type Branded<T, B extends string> = T & Brand<T, B>;

// Specific branded types
type PositiveNumber = Branded<number, 'PositiveNumber'>;
type EmailAddress = Branded<string, 'EmailAddress'>;
type UserId = Branded<string, 'UserId'>;

// Brand constructors with validation
function createPositiveNumber(value: number): PositiveNumber {
  if (value <= 0) {
    throw new Error('Number must be positive');
  }
  return value as PositiveNumber;
}

function createEmailAddress(value: string): EmailAddress {
  if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
    throw new Error('Invalid email format');
  }
  return value as EmailAddress;
}

// Usage prevents mixing of domain types
function sendEmail(to: EmailAddress, userId: UserId, amount: PositiveNumber) {
  // All parameters are type-safe and validated
}

// Error: cannot mix branded types
// sendEmail('invalid@email', 'user123', -100); // Type errors

Performance Optimization Strategies

1. Type Complexity Analysis

# Generate type trace for analysis
npx tsc --generateTrace trace --incremental false

# Analyze the trace (requires @typescript/analyze-trace)
npx @typescript/analyze-trace trace

# Check specific type instantiation depth
npx tsc --extendedDiagnostics | grep -E "Type instantiation|Check time"

2. Memory-Efficient Type Patterns

// Prefer interfaces over type intersections for performance
// Bad: Heavy intersection
type HeavyType = TypeA & TypeB & TypeC & TypeD & TypeE;

// Good: Interface extension
interface LightType extends TypeA, TypeB, TypeC, TypeD, TypeE {}

// Use discriminated unions instead of large unions
// Bad: Large union
type Status = 'a' | 'b' | 'c' | /* ... 100 more values */;

// Good: Discriminated union
type Status =
  | { category: 'loading'; value: 'pending' | 'in-progress' }
  | { category: 'complete'; value: 'success' | 'error' }
  | { category: 'cancelled'; value: 'user' | 'timeout' };

Validation Commands

# Type checking validation
tsc --noEmit --strict

# Performance validation
tsc --extendedDiagnostics --incremental false | grep "Check time"

# Memory usage validation
node --max-old-space-size=8192 ./node_modules/typescript/lib/tsc.js --noEmit

# Declaration file validation
tsc --declaration --emitDeclarationOnly --outDir temp-types

# Type coverage validation
npx type-coverage --detail --strict

Expert Resources

Official Documentation

Advanced Learning

Tools

  • type-fest - A collection of essential TypeScript types (Strongly Recommended: Use actively)
  • tsd - Type definition testing
  • type-coverage - Coverage analysis
  • ts-essentials - Utility types library

Always validate solutions with the provided diagnostic commands and ensure type safety is maintained throughout the implementation.

Code Review Checklist

When reviewing TypeScript type definitions and usage, focus on:

Type Safety & Correctness

  • All function parameters and return types are explicitly typed
  • Generic constraints are specific enough to prevent invalid usage
  • Union types include all possible values and are properly discriminated
  • Optional properties use consistent patterns (undefined vs optional)
  • Type assertions are avoided unless absolutely necessary
  • any types are documented with justification and migration plan

Generic Design & Constraints

  • Generic type parameters have meaningful constraint boundaries
  • Variance is handled correctly (covariant, contravariant, invariant)
  • Generic functions infer types correctly from usage context
  • Conditional types provide appropriate fallback behaviors
  • Recursive types include depth limiting to prevent infinite instantiation
  • Brand types are used appropriately for nominal typing requirements

Utility Types & Transformations

  • Built-in utility types and type-fest are preferred over custom implementations
  • Mapped types transform object structures correctly
  • Template literal types generate expected string patterns
  • Conditional types distribute properly over union types
  • Type-level computation is efficient and maintainable
  • Custom utility types include comprehensive documentation

Type Inference & Narrowing

  • Type guards use proper type predicate syntax
  • Assertion functions are implemented correctly with asserts keyword
  • Control flow analysis narrows types appropriately
  • Discriminated unions include all necessary discriminator properties
  • Type narrowing works correctly with complex nested objects
  • Unknown types are handled safely without type assertions

Performance & Complexity

  • Type instantiation depth remains within reasonable limits
  • Complex union types are broken into manageable discriminated unions
  • Type computation complexity is appropriate for usage frequency
  • Recursive types terminate properly without infinite loops
  • Large type definitions don't significantly impact compilation time
  • Type coverage remains high without excessive complexity

Library & Module Types

  • Declaration files accurately represent runtime behavior
  • Module augmentation is used appropriately for extending third-party types
  • Global types are scoped correctly and don't pollute global namespace
  • Export/import types work correctly across module boundaries
  • Ambient declarations match actual runtime interfaces
  • Type compatibility is maintained across library versions

Advanced Patterns & Best Practices

  • Higher-order types are composed logically and reusably
  • Type-level programming uses appropriate abstractions
  • Index signatures are used judiciously with proper key types
  • Function overloads provide clear, unambiguous signatures
  • Namespace usage is minimal and well-justified
  • Type definitions support intended usage patterns without friction

平台分布

Codex

33.73%
按下载量换算337

Claude

29.36%
按下载量换算293

Cursor

19.06%
按下载量换算190

Gemini CLI

8.95%
按下载量换算89

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills