Frontend Type Generation

CRITICAL. How to keep frontend data types in sync with the backend, ensuring type safety and reducing bugs. Use when this capability is needed.

tomevault-io 7b612c7 2 files · 1.8 KB Updated

File contents

Frontend Type Generation & Sync

Keeping data types synced between the backend and frontend is a high priority. Follow this logic exactly:

  1. Change Directory: Always start by moving into the ./frontend/ directory.
  2. Execute Generation: Run the npm script: npm run generate:types Note: This script automatically handles checking if the backend is running and choosing the appropriate generation method.
  3. Verification: Confirm that the generated type files have been updated in ./frontend/src/types/types.generated.ts.
  4. Application: Ensure that the new types are being used in the frontend codebase to maintain type safety and reduce bugs.
  5. Constraints:
    • Do NOT modify ./frontend/src/types/types.generated.ts file directly.

Converted and distributed by TomeVault — claim your Tome and manage your conversions.

tomevault-io/skills-registry/tree/main/jpmolinamatute--arch-stats--frontend-type-generation commit 7b612c7b9c

Frequently asked questions

npx skillmds@latest add tomevault-io/frontend-type-generation