Sneak Peek: Improved TypeScript support in the Node SDK #2575
prathmesh-stripe
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We're excited to announce an improved TypeScript support in our Node SDK that will make your development experience smoother and more reliable. We have a dev branch which you can use to provide feedback before the official release by the end of March this year.
What we did:
What this means for you:
🎯 Improved TypeScript Support
Get accurate autocomplete, better error detection, and reliable type checking in your IDE. No more type definition and implementation maintained separately and no more wrestling with mismatched types or missing definitions.
🚀 Easier upgrades & preview
Install more than one SDK version side-by-side. This allows you to do the below without updating your entire integration to use a different SDK version
✨ Cleaner module management
Enjoy simplified type declarations with no ambient modules, allowing you to alias the stripe package for the first time. Solves issues like #1636
Installation Instructions
We wanted to get this in your hands as quickly as possible. Therefore we decided to share this on our dev branch. We created a new dev branch to share early prototypes of new SDK features to get community feedback. The dev branch is API agnostic and may not always be at parity with the latest API release. To install the new SDK:
Note
Some APIs may not be available as this branch was built using the v20.1.0 Node SDK release.
Note
Please hold off from using this in your production systems until this makes it to our official release in March this year as we expect some interfaces to change between development build and the GA release.
TypeScript Example Script
Here’s an example script to help you quickly try out the new SDK. This syntax with types is compatible with our existing GA release and there are no breaking changes in this.
Breaking changes
Stripe.errorsandStripe.StripeContextare no longer exported as types. You can still reference them asStripe.ErrorTypeandStripe.StripeContextTypeKnown Issues
Beta Was this translation helpful? Give feedback.
All reactions