Principles
- Enable strict mode — no implicit any, strict null checks
- Prefer discriminated unions over type assertions
- Use
unknownoverany— narrow with type guards
Rules
See rules/ for detailed patterns.
TypeScript语言模式和类型安全规则。在核心编码标准的基础上扩展了特定于TypeScript的规则。在编写TypeScript代码时使用。
unknown over any — narrow with type guardsSee rules/ for detailed patterns.