N
noimplicitany-completion
About noimplicitany-completion
A TypeScript skill that treats enabling `noImplicitAny` and removing implicit `any` types as necessary steps to finish a migration. It is for developers finalizing TypeScript adoption and compiler settings.
Key features
- 01Enable `noImplicitAny`
- 02Remove implicit `any` types
- 03Review strict compiler settings
- 04Complete TypeScript migration
Use cases
- 01Finish a TypeScript migration
- 02Configure `tsconfig` for strict checking
- 03Improve type safety across a codebase
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ marius-townhouse/ effective-typescript-skills --skill noimplicitany-completionAfter installing, type/noimplicitany-completionin Claude Code to confirm it loaded.
Details
From the project READMEDon't Consider Migration Complete Until You Enable noImplicitAny
Overview
noImplicitAny is the cornerstone of TypeScript's type safety. When disabled, TypeScript silently gives variables the any type when it can't infer a type. This defeats the purpose of TypeScript. Don't consider your migration complete until you've enabled noImplicitAny and eliminated all implicit anys.
When to Use This Skill
- Finishing TypeScript migration
- Enabling strict mode
- Finalizing tsconfig configuration
- Ensuring type safety
- Completing TypeScript adoption
The Iron Rule
Enable noImplicitAny to complete your TypeScript migration. Eliminate all implicit anys for full type safety.
Example
// With noImplicitAny: false (default during migration)
function parse(data) {
// data is implicitly any - no error!
return data.json();
}
// With noImplicitAny: true
function parse(data) {
// Error: Parameter 'data' implicitly has an 'any' type
return data.json();
}
// Fixed with explicit type
function parse(data: string): unknown {
return JSON.parse(data);
}
Enabling Strict Mode
{
"compilerOptions": {
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
"strictPropertyInitialization": true,
"noImplicitThis": true,
"alwaysStrict": true
}
}
Reference
- Effective TypeScript, 2nd Edition by Dan Vanderkam
- Item 83: Don't Consider Migration Complete Until You Enable noImplicitAny
Comments
Markdown supported