React-stripe-elements: Officially support Typescript

Created on 19 Sep 2018  路  8Comments  路  Source: stripe/react-stripe-elements

Given the popularity of Typescript, first-party support for type definitions would be celebrated.

enhancement

Most helpful comment

If this is something you will consider in the future, maybe leave the issue open so people can star it and track progress?

All 8 comments

Hi there, great suggestion鈥攚e're also fans of Typescript so this is something we'll consider for a future release of this library! However, at the moment we have no current plans to work on this. We want to avoid duplicate work on type definitions so we can focus on making the core library great. A single type library to maintain would minimize the cost of adding new Elements to Stripe.js. For now, we recommend that you use the user-contributed Typescript definitions from DefinitelyTyped.

If this is something you will consider in the future, maybe leave the issue open so people can star it and track progress?

@fred-stripe I'd also ask you to keep the issue open please, so we have a place to track and discuss.
You see, the thing is that from a certain size of a codebase forward you'll have to have static types otherwise you can't quite grow anymore, especially when stripe seeks to get more traction in the enterprise space.

@fred-stripe you linked to a react definition, the issue is asking for generic support.

Would also love to see this re-opened so we could upvote.

I understand you don't want to work on type defs, but have you considered re-writing it in Typescript and getting type defs for free? The node stripe sdk seems like it's already in Typescript and has beautiful types, it's a pleasure to work with.

The DefinitelyTyped repo has old unmerged PRs, it's not terribly inviting to try to go keep that up to date. Thanks for considering it!

馃憢 We're currently beta testing React Stripe.js, a new library for integrating React and Stripe.js. React Stripe.js includes built-in TypeScript definitions from Stripe. If anyone is interesting in testing out this new library, email [email protected] with your Stripe ID for access to beta documentation.

No love for Angular? What a shame.

Hi @jpike88,

We are not currently working on Angular bindings for Stripe.js, but we are shipping the types and a convenient loader for Stripe.js separately from the new React library.

You should be able to use @stripe/stripe-js in your Angular app.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cleemputc picture cleemputc  路  5Comments

max-favilli picture max-favilli  路  5Comments

rstone770 picture rstone770  路  5Comments

Dasyel picture Dasyel  路  4Comments

stephenhuh picture stephenhuh  路  4Comments