-
-
Notifications
You must be signed in to change notification settings - Fork 846
Closed
Description
Bug
I just upgraded from 2.0.6 to 2.0.7 and the TS types are broken:
error TS7016: Could not find a declaration file for module 'react-native-permissions'. '/home/[redacted]/node_modules/react-native-permissions/lib/commonjs/index.js' implicitly has an 'any' type.
Try `npm install @types/react-native-permissions` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-native-permissions';`
Looking at the installed package.json
:
"types": "lib/typescript/src/index.d.ts",
While the directory tree looks like so:
tree ./node_modules/react-native-permissions/lib/typescript
./node_modules/react-native-permissions/lib/typescript
├── constants.d.ts
├── index.d.ts
└── types.d.ts
As you can see, the problem is in the package.json
value of the "types"
property.
0276fc8#diff-b9cfc7f2cdf78a7f4b91a753d10865a2L19
Environment info
Latest TS: 3.7.3
Library version: 2.0.7
Steps To Reproduce
- Install v2.0.7
- Try to import anything in TS
- Error as seen above
- ???
- PROFIT!!!
Describe what you expected to happen:
- It should work
Reproducible sample code
Once I reverted to 2.0.6 everything started working again.
Metadata
Metadata
Assignees
Labels
No labels