Use this skill when:
Activated when editing .ts or .tsx files in the project.
const for variables that won't be reassignedinterface over type for object shapesany — use unknown insteadvar — use const or let
@ts-ignore
// Good: explicit return type
export function calculateTotal(items: Item[]): number {
return items.reduce((sum, item) => sum + item.price, 0);
}
// Good: discriminated union
type Result<T> =
| { success: true; data: T }
| { success: false; error: Error };
tsconfig.json without explicit permission