-
Notifications
You must be signed in to change notification settings - Fork 30
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
Migrate library to Typescript #25
Conversation
Nice one @MichaelSolati! ping @jepser what do you think? |
@MichaelSolati thanks for your contribution and sorry for my delayed answer, I have a couple of comments I would like to share with you:
Finally, I believe we could break down this PR in simpler (and smaller) ones. |
@jepser it's not a problem, I know that this time of year is hectic for everyone, so I get it 100%. Anyway, addressing your points...
|
Thanks for the explanation @MichaelSolati , wdyt about:
As recommendations, we won't change the interface since we already have people using it and I don't see the benefit of it, changing it will also create a breaking change version. Also, we won't change webpack to rollup unless there is a real benefit, which I'm open to discuss in an issue. I will tag this PR for reference and close it once we have the steps above done. |
It's a full conversion of the Typeform JS SDK to Typescript for use of types/interfaces. Wether writing code in TS or JS some IDEs will pick up on the definitions and suggest completion and explain what functions do (like below).
I just want to go through the typings of responses to fix up some things, and make them easier for developers to use, but the code itself is good. I updated the tests to support Typescript. I updated the build to use rollup just because I was more familiar with it when using Typescript. I also did some other minor tweaks to linting for Typescript, but that shouldn't be that big of a deal. Hopefully everything besides the interface stuff is good to review.