Typescript
LobeHub TypeScript style and type-safety guide. Use when editing TS/TSX/MTS, fixing types, choosing interface vs type, avoiding any/object, import type, async flow, or ts-expect-error.
- Type
- Skill
- Author
- lobehub
- Category
- Code Review
- GitHub stars
- 83.5K
- Installs
- 5.2K
- Last updated
- November 2, 2026
Install
npx skills add https://github.com/lobehub/lobehub --skill typescriptUse cases
- Fix type errors in TS, TSX, or MTS files following LobeHub conventions.
- Decide between interface and type for a new declaration.
- Refactor code that uses any or object into safer types.
Frequently Asked Questions
Does it explain when to use interface versus type?
Yes, that choice is one of the conventions it covers.
What does it say about any and object?
It covers avoiding both in favor of safer typing.
Does it cover async code?
Yes, async flow is part of the style guide, along with import type and ts-expect-error.
About this skill
A TypeScript style and type-safety guide from LobeHub, covering when to use interface vs type, avoiding any and object, import type, async flow, and ts-expect-error. It's for developers editing TS/TSX/MTS files or fixing type errors who want consistent conventions. The skill focuses on linting and refactoring rather than teaching TypeScript from scratch.
Summary written with AI assistance from the project's public description.
Categories
More from lobehub
Zustand
LobeHub Zustand store conventions. Use when editing src/store, store slices, public/internal actions, dispatch actions, flattenActions, optimistic...
by lobehub
React
LobeHub React component conventions. Use when editing TSX UI, choosing base-ui vs @lobehub/ui vs antd, styling with antd-style, component boundarie...
by lobehub
Drizzle
LobeHub Drizzle ORM schema and query style. Use for pgTable schemas, indexes, joins, inferred types, db.select/db.query, schema fields, foreign key...
by lobehub
Similar Skills
Find Skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", o...
by vercel-labs
Grill Me
A relentless interview to sharpen a plan or design.
by mattpocock
Ai Video Generation
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0,...
by inference-sh
Ai Image Generation
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FL...
by inference-sh