name: typescript description: 'Skill: typescript'
Typing Guidelines
- Avoid
anyat all cost. The types should work or they indicate a problem. - Never use
as "any"oras unknown asto solve/avoid type errors. The types should work or they indicate a problem. - Avoid using
asto cast to a specific type. The types should work or they indicate a problem.
Exports / Imports
- Never create index barrel files (index.ts, index.js)
- Always use direct imports with named exports
- Always use inline interfaces with function parameters
Examples
Good - Inline interface with function:
export function processData({
id,
name,
options,
}: {
id: string;
name: string;
options: ProcessingOptions;
}): ProcessedResult {
// implementation
}
Bad - Separated interface:
interface ProcessDataProps {
id: string;
name: string;
options: ProcessingOptions;
}
export function processDAta({
id,
name,
options,
}: ProcessDataProps): ProcessResult {
// Implementation
}
chat Comments (0)
Sign in to join the discussion and leave a comment.
Skill Details
GitHub Stars
1.2k
GitHub Forks
108
Created
Mar 2026
Last Updated
3 months ago
tools
tools ide plugins
Related Skills
Build your own?
Join 12,000+ developers contributing to the Claude ecosystem.
No comments yet. Be the first to share your thoughts!