Write type-safe TypeScript code with strict mode enabled, comprehensive type definitions, proper error handling, and elimination of any types. Use when enabling TypeScript strict mode, adding types to existing JavaScript, fixing type errors, creating type definitions, using utility types, implementing type guards, avoiding any types, creating generic types, or ensuring complete type safety across the codebase.
Content & Writing
93 Stars
10 Forks
Updated Nov 26, 2025, 11:09 PM
Why Use This
This skill provides specialized capabilities for korallis's codebase.
Use Cases
Developing new features in the korallis repository
Refactoring existing code to follow korallis standards
Understanding and working with korallis's codebase structure
---
name: typescript-strict
description: Write type-safe TypeScript code with strict mode enabled, comprehensive type definitions, proper error handling, and elimination of any types. Use when enabling TypeScript strict mode, adding types to existing JavaScript, fixing type errors, creating type definitions, using utility types, implementing type guards, avoiding any types, creating generic types, or ensuring complete type safety across the codebase.
---
# TypeScript Strict - Type Safety Best Practices
## When to use this skill
- Enabling TypeScript strict mode in projects
- Adding types to existing JavaScript codebases
- Fixing TypeScript type errors systematically
- Creating comprehensive type definitions
- Using TypeScript utility types (Partial, Pick, Omit)
- Implementing type guards and assertions
- Eliminating any types from codebase
- Creating generic, reusable typed functions
- Ensuring null/undefined safety
- Typing complex data structures
- Creating discriminated unions
- Implementing strict function signatures
## When to use this skill
- Ensuring type safety, preventing runtime errors.
- When working on related tasks or features
- During development that requires this expertise
**Use when**: Ensuring type safety, preventing runtime errors.
## Config
\`\`\`json
{
"compilerOptions": {
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitReturns": true
}
}
\`\`\`
## Resources
- [TypeScript Handbook](https://www.typescriptlang.org/docs/)