typescript-strict
Use when writing TypeScript with strict mode - covers type definitions, generics, and declaration files
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when writing TypeScript with strict mode - covers type definitions, generics, and declaration files
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when configuring ESLint - covers flat config, TypeScript integration, and custom rules
Use when creating GitHub Actions workflows - covers CI/CD, matrix testing, and release automation
Use when writing Jest tests - covers testing patterns for interpreters, parsers, and async code
Use when designing language features - covers lexer, parser, AST, and interpreter patterns
Use when implementing Language Server Protocol features - covers completions, hover, diagnostics, and navigation
Use when creating Mermaid diagrams - covers flowcharts, sequence diagrams, and AST visualization
| name | typescript-strict |
| description | Use when writing TypeScript with strict mode - covers type definitions, generics, and declaration files |
// Enable strict in tsconfig.json
{
"compilerOptions": {
"strict": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true
}
}
undefined and null explicitlyanyreadonly for immutable data// Discriminated union for AST nodes
type Expr =
| { type: "NumberLiteral"; value: number }
| { type: "BinaryExpr"; op: string; left: Expr; right: Expr }
| { type: "Identifier"; name: string };
// Type guard
function isNumberLiteral(expr: Expr): expr is Extract<Expr, { type: "NumberLiteral" }> {
return expr.type === "NumberLiteral";
}
// Constrained generics
function map<T, U>(arr: readonly T[], fn: (item: T, index: number) => U): U[] {
return arr.map(fn);
}
// Conditional types
type Unwrap<T> = T extends Promise<infer U> ? U : T;
// module.d.ts
declare module "lea-lang" {
export function run(code: string): unknown;
export function parse(code: string): Program;
}
unknown over any for safer type narrowinginterface for extendable types, type for unionsas const for literal typessatisfies for type checking without widening