Braintree-web: Typescript Type Definition

Created on 6 Sep 2016  路  7Comments  路  Source: braintree/braintree-web

Please create Typescript type definition and host it on https://github.com/DefinitelyTyped/DefinitelyTyped

You can also learn more about Definitely typed here http://definitelytyped.org/

It would tremendously help Typescript developers using Braintree.

Most helpful comment

Needs updating!

Missing lots of things now such as:

  • authorization in HostedFieldFieldOptions
  • New PayPal client
  • Vault manager (fetchPaymentMethods etc).

All 7 comments

This isn't something that's on our roadmap but we'll happily endorse an unofficial TypeScript definition!

Because we document everything with JSDoc, you might be able to use a tool like jsdoc2tsd to transform our JSDocs into .d.ts files, at least as a starting point.

Sounds good. Thank you for pointing out the tool, I'll check it out and will respond to this thread when I have something hosted

@EvanHahn I've created the typescript type definitions for v3.0.2. Feel free to review them https://github.com/chlela/DefinitelyTyped/blob/master/braintree-web/braintree-web.d.ts

I also took the examples from the documentation to test; you can view them
https://github.com/chlela/DefinitelyTyped/blob/master/braintree-web/braintree-web-tests.ts

Looks cool. Feel free to open a PR on DefinitelyTyped and have them take a look.

It would be nice to see it being published to npm @types with https://github.com/Microsoft/types-publisher

Needs updating!

Missing lots of things now such as:

  • authorization in HostedFieldFieldOptions
  • New PayPal client
  • Vault manager (fetchPaymentMethods etc).
Was this page helpful?
0 / 5 - 0 ratings

Related issues

raRaRa picture raRaRa  路  6Comments

coxy picture coxy  路  9Comments

clindsey picture clindsey  路  10Comments

gabrycaos picture gabrycaos  路  3Comments

fazpu picture fazpu  路  6Comments