Closed psoaresbj closed 1 year ago
Hi @psoaresbj, we would prefer keeping type generation enabled for all projects, even ones not using TypeScript. The types will continue to work in JavaScript projects since language server-enabled editors, like VS Code, use the TypeScript server to handle autocomplete.
Since you opened this issue, we changed how types are generated, resulting in 1000x-4600x faster type generation (see this PR).
Could you update to the latest version of Slice Machine and @slicemachine/adapter-next
and try it again?
If the type generation is still a blocker for you, please let us know and we can reconsider.
Is your feature request related to a problem? Please describe.
Not using TS in one of my projects (and there's a lot of
customTypes
andslices
), however,prismicio-types.d.ts
it's being created, which makes me delete the file every opened PR or ignore him in.gitignore
,.eslintignore
, etc. But the major problem is that's taking too long to save to file system. I know there's already being addressed the performance issue in #51 however, should be perfect, just to allow an option onslicemachine.config.json
to not create theprismicio-types.d.ts
file.Locally, we have to fork and add an early return in the generation function.
Describe the solution you'd like
prismicio-types.d.ts
file.