Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider extending SbBlokData for all blok-types #62

Open
jsve opened this issue Jan 15, 2024 · 1 comment
Open

Consider extending SbBlokData for all blok-types #62

jsve opened this issue Jan 15, 2024 · 1 comment

Comments

@jsve
Copy link

jsve commented Jan 15, 2024

At the moment there is no generic way to declare responses from the storyblok API. I'm declaring the response of useStoryblokApi().get() as StoryblokStory. More appropriate would be StoryblokStory, however there is nothing saying that all the generated types match SbBlokData.

Does adding extends SbBlokData to all generated types make sense? If so, please consider adding it. This would also mean that all generated interfaces does no longer need to declare _uid and [k:string] anymore.

@dohomi
Copy link
Owner

dohomi commented Feb 27, 2024

If there are some new types from Storyblok itself we can use I am happy to review a PR. This library was written in a time where Storyblok didn't deliver any consumable types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants