# typescript > TypeScript strict mode patterns - Author: PHAN ANH TUAN - Repository: TUAN130294/Universalkit - Version: 20251220090240 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-07 - Source: https://github.com/TUAN130294/Universalkit - Web: https://mule.run/skillshub/@@TUAN130294/Universalkit~typescript:20251220090240 --- --- name: typescript description: TypeScript strict mode patterns --- # TypeScript Skill ## Config ```json { "compilerOptions": { "strict": true, "noUncheckedIndexedAccess": true } } ``` ## Patterns ```typescript type Result = { ok: true; data: T } | { ok: false; error: Error }; function isString(v: unknown): v is string { return typeof v === 'string'; } ``` ## Best Practices - Enable strict mode - Avoid `any`, use `unknown` - Prefer interfaces for objects