Closed mixmav closed 10 months ago
everything which is not a Storyblok component (plugins) can't know the definition, so if you do have a custom plugin you need to extend the type declaration as its not possible to know what the plugin is doing under the hood.
@dohomi Thanks for the quick response! How would I go about extending the type declaration?
Should I create a new custom type, for example ColorPickerStoryblok
, and manually add it to the CountdownStoryblok
type definition after importing it? Any way to semi-automate this?
you can use https://github.com/dohomi/storyblok-generate-ts?tab=readme-ov-file#example-custom-parser for your custom plugin thats the easiest to integrate you can add it via the https://github.com/dohomi/storyblok-generate-ts?tab=readme-ov-file#properties-of-cli
When I add a custom plugin field of, for example, a native color picker, the Blok doesn't include that field in its generated schema at all, even though the JSON returned contains the information.
Is this by design? If not, any suggestions on a workaround would be appreciated. Thanks 🤝