Closed EddyVinck closed 2 years ago
Hey @EddyVinck, thanks for the bug report!
This should be fixed as of v0.1.3
. Custom Types or Shared Slices that start with a number (e.g. 404-page
) will have types prefixed with an underscore (e.g. _404Page
).
If you want to learn more about the underlying issue and why the underscore is necessary, see PR #30.
You can update to the latest version with the following command:
npm install --save-dev prismic-ts-codegen
Then re-generate your types:
npx prismic-ts-codegen
If this doesn't fix the issue, please let me know and I'll take another look. Thanks! 🙂
Hi! 👋 I noticed a bug when the
id
in my custom type starts with a number.Versions
Reproduction
Steps to reproduce
"id"
property starting with a number, like"404-page"
in my case.npx prismic-ts-codegen
id
to something like"my-404-page"
What is expected?
An error stating that my ID can't start with a number would be great! Maybe an update to
slice-machine-ui
to prevent this would be nice as well.What is actually happening?
I'm getting a really vague error: