Closed saadrawasia closed 3 years ago
We do not maintain those type definitions.
The next major version of the core SDK and Drop-in will be written in Typescript, so you will no longer need this 3rd party type definition.
In the meantime, you can either supply your own type definitions, or ignore typing concerns for the Braintree SDK.
@crookedneighbor Do you have estimates on new version release?
I do not have an estimate yet. It's unlikely to be ready in the near future though. (first will come upgrading the core Braintree SDK that Drop-in uses internally to Typescript, then we can start the work of upgrading Drop-in to Typescript as well)
General information
Issue description
I am using react and typescript. Whenever I run npm run start it shows the error that I have to install @types/braintree-web-drop-in. After installing that when I run npm run start it shows the following error:
ERROR in /../frontend/node_modules/@types/braintree-web-drop-in/index.d.ts(259,11): 259:11 Subsequent variable declarations must have the same type. Variable 'braintree' must be of type 'typeof import("/../frontend/node_modules/@types/braintree-web/index")', but here has type '{ dropin: { create(options: Options, callback: (error: object | null, dropin: Dropin | undefined) => void): void; create(options: Options): Promise; }; }'.
257 |
258 | declare global {
I am unable to resolve the issue.