typescript-strict

Write type-safe TypeScript code with strict mode, utility types, and type guards.

3|Updated Aug 26, 2026
One-click install
npx skills add https://github.com/Fabric-Pro/fabric-oss --skill typescript-strict-fabric-pro
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: typescript-strict
Source: https://github.com/Fabric-Pro/fabric-oss/tree/main/.cursor/skills/typescript-strict
Command: npx skills add https://github.com/Fabric-Pro/fabric-oss --skill typescript-strict-fabric-pro

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? JavaScript codebases and loosely typed TypeScript projects suffer from runtime errors caused by missing type safety, unchecked null values, and pervasive any types. This Skill provides guidance for enabling strict mode and systematically eliminating type errors. ## Core Features & Use Cases - Strict Mode Configuration: Enable TypeScript strict mode with compiler options like noUncheckedIndexedAccess and noImplicitReturns. - Type Definition Authoring: Create comprehensive type definitions, generic functions, discriminated unions, and utility types such as Partial, Pick, and Omit. - Type Guard Implementation: Add type guards and assertions to ensure null/undefined safety across the codebase. - Use Case: When migrating a legacy JavaScript project to TypeScript, use this Skill to incrementally add types, fix compiler errors, and remove all any types until the codebase compiles cleanly under strict mode. ## Quick Start Ask the AI to enable TypeScript strict mode in your project and fix all resulting type errors without using any types.

Frequently Asked Questions about typescript-strict

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable TypeScript strict mode in an existing project?▼

Set "strict": true in the compilerOptions of your tsconfig.json, then add noUncheckedIndexedAccess and noImplicitReturns for stronger checks. Fix the resulting errors incrementally by adding type annotations and type guards.

How to eliminate any types from a TypeScript codebase?▼

Replace any types with specific interfaces, generics, or the unknown type combined with type guards. Use utility types like Partial, Pick, and Omit to derive precise types from existing definitions instead of falling back to any.

What are TypeScript utility types and when should I use them?▼

Utility types like Partial, Pick, and Omit transform existing types into new ones without redefining them. Use Partial for optional updates, Pick to select subsets of properties, and Omit to exclude fields when creating derived types.

Does TypeScript strict mode catch null and undefined errors?▼

Yes, strict mode enables strictNullChecks, which forces explicit handling of null and undefined values. Combined with noUncheckedIndexedAccess, it also flags potentially undefined results from array and object index access.

Why does noUncheckedIndexedAccess cause type errors on array access?▼

This flag adds undefined to the return type of index access because the compiler cannot guarantee the index exists. Handle it with explicit undefined checks, optional chaining, or type guards before using the accessed value.