`types/config.ts` is causing tsc errors
nbudin opened this issue · comments
Hi there! After adding @stripe/connect-js
to a project that uses TypeScript, I'm getting the following errors:
yarn run tsc --noEmit
yarn run v1.22.19
warning ../../package.json: No license field
$ /Users/nbudin/src/indigo/node_modules/.bin/tsc --noEmit
node_modules/@stripe/connect-js/types/config.ts:9:7 - error TS6133: 'termOfServiceUrl' is declared but its value is never read.
9 termOfServiceUrl: string | undefined
~~~~~~~~~~~~~~~~
node_modules/@stripe/connect-js/types/config.ts:12:7 - error TS6133: 'recipientTermsOfServiceUrl' is declared but its value is never read.
12 recipientTermsOfServiceUrl: string | undefined
~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@stripe/connect-js/types/config.ts:14:27 - error TS6133: 'privacyPolicyUrl' is declared but its value is never read.
14 setPrivacyPolicyUrl: (privacyPolicyUrl: string | undefined): void => {},
~~~~~~~~~~~~~~~~
node_modules/@stripe/connect-js/types/config.ts:16:7 - error TS6133: 'skipTermsOfServiceCollection' is declared but its value is never read.
16 skipTermsOfServiceCollection: boolean | undefined
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@stripe/connect-js/types/config.ts:18:17 - error TS6133: 'listener' is declared but its value is never read.
18 setOnExit: (listener: (() => void) | undefined): void => {}
~~~~~~~~
node_modules/@stripe/connect-js/types/config.ts:24:6 - error TS6196: 'CustomMethodConfigValidation' is declared but never used.
24 type CustomMethodConfigValidation = HasType<
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 6 errors in the same file, starting at: node_modules/@stripe/connect-js/types/config.ts:9
I'm going to attempt to work around this for now by forking the library and removing the config.ts
file, since I don't see it actually being used anywhere.
@nbudin thanks for the error report. I've sent a PR to fix this one!
Great, thanks @jorgea-stripe! I've tried pointing my app at that branch and I can confirm it fixes the compilation issues.