Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
frontend ruleP2project specificStack: TypeScript
typescriptorganizationtypes
Put type aliases in the types location, not the interfaces one
Declarations using `type` (unions, aliases) belong in the types directory; reserve the interfaces directory for actual interfaces.
PR: hegnar-zephr-components · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codetypescript
| 1 | // interfaces/StartThread.ts |
| 2 | export type ThreadStatus = 'open' | 'closed'; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | // types/StartThread.ts |
| 2 | export type ThreadStatus = 'open' | 'closed'; |
Explanation (EN)
Objašnjenje (HR)