Purchasely / Purchasely-ReactNative

Other
13 stars 2 forks source link

Typescript declaration are missing after `4.3.0` #105

Closed PSniezak closed 4 months ago

PSniezak commented 4 months ago

Hi,

Following version 4.3.0 (#97), I encountered the following error with all my react-native-purchasely imports :

Could not find a declaration file for module 'react-native-purchasely'. '/home/circleci/repo/node_modules/react-native-purchasely/lib/commonjs/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/react-native-purchasely` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-native-purchasely';`

This issue might be related to the new rootDir value, which seems to place every file from lib/typescript into lib/src/typescript. To resolve this, I believe you just need to override the value to compilerOptions.rootDir: "./src" in the tsconfig.build.json.

I intended to submit a pull request, but yarn typescript is failing on master for me.

Thank you very much,