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

Added Typescript Support for Storyblok Bridge #3

Closed
wants to merge 1 commit into from
Closed

Added Typescript Support for Storyblok Bridge #3

wants to merge 1 commit into from

Conversation

imabp
Copy link
Contributor

@imabp imabp commented Jan 28, 2022

I have added typescript support for Storyblok Bridge.
The code implements Declaration merging with global class which helps to fulfill the requirement for useStoryblok hook in a typesafe way.

This is being tried and tested here

@imabp
Copy link
Contributor Author

imabp commented Jan 29, 2022

👋 Hey @fgiuliani @alexjoverm .
Please review and merge 😊

@alexjoverm
Copy link
Contributor

Hey @imabp, to add full Typescript integration will require more work. Let me give you a few pointers:

  • We prefer having the source code in Typescript. In that way, types are autogenerated, better typed, and easier to maintain
  • Types can be more sophisticated/elaborated
  • More steps are needed to integrate Typescript (like a few changes in package.json) and we'd rather keep it in 1 PR since is not much work

So we can't accept this PR as it is now, but if you feel like these changes is something you can and want to do, feel free to go for it.

@imabp imabp mentioned this pull request Jan 31, 2022
@imabp
Copy link
Contributor Author

imabp commented Jan 31, 2022

Thank you so much @alexjoverm !!
I was also thinking the same, so we can extend support for both the languages.
I have created a new issue for migrating to typescript: #4

Feel free to assign the work, would love to work on it!

@imabp imabp closed this Jan 31, 2022
@patsimm
Copy link

patsimm commented Apr 4, 2022

@alexjoverm I tried to apply the points you had in #13.

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

Successfully merging this pull request may close these issues.

None yet

3 participants