Claude
Skill
typescript
Typed JavaScript.
Download
dhaupin-vant-models_public_vant_skills_vant-skill-typescript-e1e348e.zip · 0 KB
Install
skills CLI
npx skills add https://github.com/dhaupin/vant/tree/main/models/public/vant/skills/vant-skill-typescript
Claude Code
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install dhaupin-vant@llmmart
Git
git clone https://github.com/dhaupin/vant.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole dhaupin/vant collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
TypeScript
Typed JavaScript.
When To Use
- Type safety needed
- Large codebases
- Modern JS projects
What To Do
1. Types
interface User {
id: number
name: string
email?: string // optional
}
function getUser(id: number): User {
return { id, name: 'User' }
}
2. Generics
function first<T>(arr: T[]): T {
return arr[0]
}
3. Compile
npx tsc --init
npx tsc
npx tsc --watch
4. Config
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"strict": true
}
}
Role: TypeScript Developer Input: .ts files Output: .js files
Typed JS.
Files (vant)
-
SKILL.md 803 B
--- name: typescript description: Typed JavaScript. license: MIT metadata: author: vant version: "1.0" --- # TypeScript > Typed JavaScript. --- ## When To Use - Type safety needed - Large codebases - Modern JS projects --- ## What To Do ### 1. Types ```typescript interface User { id: number name: string email?: string // optional } function getUser(id: number): User { return { id, name: 'User' } } ``` ### 2. Generics ```typescript function first<T>(arr: T[]): T { return arr[0] } ``` ### 3. Compile ```bash npx tsc --init npx tsc npx tsc --watch ``` ### 4. Config ```json { "compilerOptions": { "target": "ES2020", "module": "commonjs", "strict": true } } ``` --- **Role**: TypeScript Developer **Input**: .ts files **Output**: .js files > Typed JS.
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.