braintree / braintree_node

Braintree Node.js library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
335 stars 104 forks source link

Types for Braintree Node.js library #121

Closed AllanSimoyi closed 6 years ago

AllanSimoyi commented 6 years ago

Haven't been able to find any typings for Braintree. The only typings i have come across are for braintree-web, none for the server-side library.

Can someone assist regarding this?

crookedneighbor commented 6 years ago

I assume you mean for Typescript or something similar. Braintree doesn't use Typescript when developing this library (the braintree-web one is community created, not made by Braintree), so we don't have a type file for it.

If you'd like to provide your own type file for it, you can open a PR on https://github.com/DefinitelyTyped/DefinitelyTyped

techieshark commented 5 years ago

+1 for type definitions; it seems the Braintree API docs would be a pretty good place to look for anyone able to start with that.

Perhaps a path forward would be similar to that taken by Stripe, where the community has created the type definitions and this repo would just contain documentation on how to use them.

koldoon commented 5 years ago

+1 for type definitions. Many serious financial projects use static type checking and typescript in common to minimise amount of errors in production.

smrubin commented 5 years ago

For reference, a definition was published on DefinitelyTyped: https://www.npmjs.com/package/@types/braintree

techieshark commented 5 years ago

@smrubin legend, thanks!