dohomi / storyblok-generate-ts

Generates TypeScript interface types based on Storyblok component file
MIT License
102 stars 33 forks source link

Extra "| string" in the option list #63

Closed MaksimIakovenko-TomTom closed 7 months ago

MaksimIakovenko-TomTom commented 9 months ago

In case of a "Multi-Options" field pointing to another story (source === "internal_stories") I think there is no way there can be a string in the option list.

Talking about | string at the end of all those types:

https://github.com/dohomi/storyblok-generate-ts/blob/0e1920e8e342f90ff599c9f8093ae31a740f3418/src/index.ts#L207-L230

MaksimIakovenko-TomTom commented 7 months ago

I realised that it can actually be a string if you did not specify this property in "resolve_relations" when making an API call (will contain the story id in this case). Closing the issue.