Apply, review, and explain the opinionated conventions in the TypeScript Style Guide. Use automatically only when TypeScript conventions are part of the requested task, including type modelling, discriminated unions, function APIs, variables and state,…
Apply, review, and explain discriminated unions in TypeScript. Use automatically for tasks involving mutually exclusive variants, invalid state prevention, exhaustiveness checking, variant-specific object properties, application state, function arguments, or…
Apply, review, and explain testing conventions from the TypeScript Style Guide. Use automatically for TypeScript and TSX test tasks involving test design, AAA, mocking, isolation, black-box testing, Testing Library queries, test descriptions, or snapshots.
Apply, review, and explain React conventions from the TypeScript Style Guide. Use automatically for TypeScript and TSX tasks involving prop-derived state, prop typing, component responsibilities, data flow, compound components, or client and server state.
Apply, review, and explain TypeScript source organization conventions. Use automatically for tasks involving feature-based organization, code colocation, import paths, import sorting, monorepos, or frontend and backend project structure.
Apply, review, and explain TypeScript naming conventions. Use automatically for tasks involving exports, identifiers, generic type parameters, acronyms, React props and handlers, hooks, comments, or TSDoc.
Apply, review, and explain TypeScript variable conventions. Use automatically for tasks involving variable declarations, const assertions, enum alternatives, literal-union state modelling, boolean flags, or choosing between null and undefined.
Apply, review, and explain TypeScript function conventions. Use automatically for tasks involving function responsibility, statelessness, purity, side effects, function arguments, function API design, or return types.