typescript-dev

- 在 tsconfig.json 中启用严格模式(strict mode),以获得更全面的类型检查

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "typescript-dev" with this command: npx skills add wulnut/lark_agent/wulnut-lark-agent-typescript-dev

TypeScript 开发规范

代码规范

  • 在 tsconfig.json 中启用严格模式(strict mode),以获得更全面的类型检查

  • 对对象结构使用 interface ,对联合类型(union)或交叉类型(intersection)使用 type

  • 在可能的情况下利用类型推断(type inference),减少显式类型注解

  • 使用泛型(generics)构建可复用的组件与函数

  • 启用 strictNullChecks ,防止 null 和 undefined 引发错误

  • 使用泛型提升类型推断能力,增强组件的可复用性

  • 优先使用类型守卫(type guards)进行运行时检查,尽量避免强制类型断言(as )

  • 避免使用 any 类型,不确定类型时优先使用 unknown 或泛型

  • 熟练使用 TypeScript 工具类型(Utility Types,如 Pick , Omit , Partial )来转换类型

  • 在终端运行命令时,默认使用 pnpm 作为包管理器

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

python-dev

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

cpp-dev

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

async-python-patterns

No summary provided by upstream source.

Repository SourceNeeds Review