Oak-Digital / types-4-strapi-2

Automate the creation of typescript interfaces for your strapi 4 projects
MIT License
24 stars 4 forks source link

Multiple Plugins with content types with the same name leads to problems #30

Open EsGeh opened 1 year ago

EsGeh commented 1 year ago

Description

Let's say a strapi project uses 2 different types of plugins, e.g. nav1 and nav2 which both export some content type Navigation Generating types for the project:

$ npx t4s --reader load-strapi --delete-old --in . --out src/generated/types/

Problem

Invalid output. src/generated/types/ contains only one file named Navigation.ts. Its content contains a mess (invalid Typescript code). Seems like it was concurrently written by 2 threads without proper synchronizisation.

Suggestion: