79114012

Date: 2024-10-22 12:23:31
Score: 1
Natty:
Report link

simply create a directory called "typescript" in the root of your project, create sub directories like "enums.ts", "interfaces/fetch.ts" for interfaces belong to api call responses, "interfaces/payload.ts" for interfaces that belong to payload of "post" or "put" or "patch" requests, "interfaces/app.ts" for interfaces that are used in more than one place, "types/app.ts" for types that are being used in more than one place.

then import these types and interfaces in your pages and components.

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: elham zeinodini