From typescript-plugin
Provides 2025 TypeScript strict mode tsconfig.json recommendations, explains strict flags like noUncheckedIndexedAccess, moduleResolution (Bundler vs NodeNext), verbatimModuleSyntax. Use for new projects or stricter type safety migrations.
npx claudepluginhub laurigates/claude-plugins --plugin typescript-pluginThis skill is limited to using the following tools:
Modern TypeScript configuration with strict type checking for maximum safety and developer experience. This guide focuses on TypeScript 5.x best practices for 2025.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Modern TypeScript configuration with strict type checking for maximum safety and developer experience. This guide focuses on TypeScript 5.x best practices for 2025.
| Use this skill when... | Use another approach when... |
|---|---|
| Setting up a new TypeScript project | Debugging runtime errors (use debugger) |
| Migrating to stricter type safety | Configuring build tools (use bundler docs) |
| Choosing moduleResolution strategy | Writing application logic |
| Enabling noUncheckedIndexedAccess | Optimizing bundle size (use bundler skills) |
What is Strict Mode?
Key Capabilities
{
"compilerOptions": {
// Type Checking
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
// Modules
"module": "ESNext",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": false,
"verbatimModuleSyntax": true,
// Emit
"target": "ES2022",
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"outDir": "dist",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"removeComments": false,
"noEmit": false,
// Interop
"isolatedModules": true,
"allowJs": false,
"checkJs": false,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "build"]
}
strict: true (Umbrella Flag)Enables all strict type-checking options:
{
"strict": true
// Equivalent to:
// "noImplicitAny": true,
// "strictNullChecks": true,
// "strictFunctionTypes": true,
// "strictBindCallApply": true,
// "strictPropertyInitialization": true,
// "noImplicitThis": true,
// "alwaysStrict": true
}
Always enable strict: true for new projects.
| Flag | Purpose |
|---|---|
noUncheckedIndexedAccess | Index signatures return T | undefined instead of T |
noImplicitOverride | Require override keyword for overridden methods |
noPropertyAccessFromIndexSignature | Force bracket notation for index signatures |
noFallthroughCasesInSwitch | Prevent fallthrough in switch statements |
exactOptionalPropertyTypes | Optional properties cannot be set to undefined explicitly |
noUncheckedIndexedAccess (Essential)// With noUncheckedIndexedAccess
const users: Record<string, User> = {};
const user = users['john'];
// Type: User | undefined (correct - must check before use)
if (user) {
console.log(user.name); // Type narrowed to User
}
Always enable this flag to prevent runtime errors.
| Strategy | Use For | Extensions Required |
|---|---|---|
Bundler | Vite, Webpack, Bun projects | No |
NodeNext | Node.js libraries and servers | Yes (.js) |
moduleResolution: "Bundler" (Vite/Bun){
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler"
}
}
exports field supportmoduleResolution: "NodeNext" (Node.js){
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext"
}
}
type: "module".js extensions (even for .ts files)Prevents TypeScript from rewriting imports/exports.
{
"compilerOptions": {
"verbatimModuleSyntax": true
}
}
// Error: 'User' is a type and must be imported with 'import type'
import { User } from './types';
// Correct
import type { User } from './types';
// Correct (mixed import)
import { fetchUser, type User } from './api';
Replaces deprecated importsNotUsedAsValues and preserveValueImports.
| Context | Command |
|---|---|
| Check errors | bunx tsc --noEmit |
| Check single file | bunx tsc --noEmit src/utils.ts |
| Show config | bunx tsc --showConfig |
| Check module resolution | bunx tsc --showConfig | grep moduleResolution |
| Flag | Value | Category |
|---|---|---|
strict | true | Type Checking |
noUncheckedIndexedAccess | true | Type Checking |
noImplicitOverride | true | Type Checking |
noPropertyAccessFromIndexSignature | true | Type Checking |
noFallthroughCasesInSwitch | true | Type Checking |
module | ESNext / NodeNext | Modules |
moduleResolution | Bundler / NodeNext | Modules |
verbatimModuleSyntax | true | Modules |
target | ES2022 | Emit |
isolatedModules | true | Interop |
skipLibCheck | true | Interop |
For detailed examples, advanced patterns, and best practices, see REFERENCE.md.