This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| description: "MANDATORY for ALL TypeScript output - files AND conversational snippets. Covers: strict mode, Result types, discriminated unions, readonly, import type, as const. Trigger: any TS code, types, interfaces, generics, error handling. No exceptions for 'simple' requests." | |
| --- | |
| # TypeScript Best Practices | |
| ## When to Use This Skill | |
| This skill should be triggered when: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## OOP Best Practices | |
| ### Composition & DI | |
| - Favor composition over inheritance (prefer constructor injection over deep inheritance trees) | |
| - Inject dependencies via constructors or factories | |
| - Avoid service locators or hidden globals | |
| ### SOLID Principles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% comment %} | |
| Accepts 3 arguments: | |
| log: <Liquid object> | |
| label: <string> | |
| floating: <boolean> | |
| {% endcomment %} | |
| <div | |
| style=" |