storyblok-generate-ts icon indicating copy to clipboard operation
storyblok-generate-ts copied to clipboard

Typed groups?

Open combi-35 opened this issue 4 months ago • 1 comments

Hi, within storyblok you can create fields of type group. The group itself becomes a property of the defintion.

For example, I created a group colors and would like to have all colors inside there like primary, secondary. So far colors is exported as a field with type any. Bildschirmfoto 2024-04-26 um 11 19 09

I would like to access thoose properties with colors.primary and not just primary. Is this somehow possible?

combi-35 avatar Apr 26 '24 09:04 combi-35

I think you'd extend your TS with overwriting the colors similar to this approach: https://github.com/dohomi/storyblok-generate-ts?tab=readme-ov-file#resolve-relations

dohomi avatar Apr 29 '24 01:04 dohomi