You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But all typescript types are generated and merged into one file in a project level. Which makes impossible to use generated types in common slices.
Describe the solution you'd like
I would suggest the simple thing. To generate 2 separate files. We can rely on the slicemachine.config.json's libraries to determine the directory to put these files. So in the end we will have 2 files which makes sense to me: ./node_modules/common-slices/src/slices/prismicio-types.d.ts ./slices/prismicio-types.d.ts
As a bonus, we can consider to generate custom types' types into customtypes folder.
Describe alternatives you've considered
It's not possible to use the file from a project level in a package.
Additional context
Our project is a monorepo structured where our common slices are located in a package and we can have multiple applications using them.
The text was updated successfully, but these errors were encountered:
Thanks for the typescript types generation feature. It's awesome.
Is your feature request related to a problem? Please describe.
We have slices separated in two directories. One in a project level directory, another one in a package.
So our config looks something like this:
But all typescript types are generated and merged into one file in a project level. Which makes impossible to use generated types in common slices.
Describe the solution you'd like
I would suggest the simple thing. To generate 2 separate files. We can rely on the
slicemachine.config.json
'slibraries
to determine the directory to put these files. So in the end we will have 2 files which makes sense to me:./node_modules/common-slices/src/slices/prismicio-types.d.ts
./slices/prismicio-types.d.ts
As a bonus, we can consider to generate custom types' types into
customtypes
folder.Describe alternatives you've considered
It's not possible to use the file from a project level in a package.
Additional context
Our project is a monorepo structured where our common slices are located in a package and we can have multiple applications using them.
The text was updated successfully, but these errors were encountered: