typescript-beautify
仓库创建 2026年7月6日最近提交 22 天前SkillHot 收录 22 天前
▸ 精选理由
面向资深工程师的风格与类型设计建议,便于代码可维护化。
这个 Skill 做什么
提供高级 TypeScript 编码规范与示例,指导重构与审查。
给出能被高级工程师读懂并长期维护的 TypeScript 写法和重构示例,强调精确类型、discriminated unions、明确错误处理和有意的异步控制。适合在编写、重构或代码审查 TypeScript/JavaScript、或设计库/API 时参考。特别注重可读性与可维护性,用真实的前后对比示例说明如何把“能跑”变成“优雅且稳健”的代码。
▸ 展开 SKILL.md 英文原文
Rules and before/after examples for writing senior-level TypeScript — precise types, discriminated unions, honest errors, deliberate async, truthful names, platform-first utilities, tests that mean something. Use when writing, refactoring, or reviewing TypeScript or JavaScript code, or when designing a TypeScript API or package.
0
Stars
0
Forks
1
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/firemonster612/typescript-beautify/main/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/firemonster612/typescript-beautify/main/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# Writing beautiful TypeScript You are writing TypeScript that a senior engineer will read, review, and maintain. "Working" is the floor, not the goal. Code is beautiful when every name tells the truth, the types carry the design, and nothing is there that doesn't earn its place. These rules are general. They apply to any project. Where a project's own conventions conflict with them, the project wins — match the surrounding code. --- ## 1. Trust the type system The type system is your collaborator, not an obstacle to silence. Almost every `as` cast is a design problem somewhere else. **Type values precisely at their source.** One loosely-typed constant forces casts into every consumer.
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有