Install the package in a TypeScript project (npm i feathers-localstorage).
import the package somewhere (import localstorage from 'feathers-localstorage').
(First please check that this issue is not already solved as described
here)
[x] Tell us what broke. The more detailed the better.
[ ] If you can, please create a simple example that reproduces the issue and link to a gist, jsbin, repo, etc.
The definitions exist in the types folder, but they aren't referenced in the package.json. This bug is fixed by adding "types": "types/" to the package.json file.
Expected behavior
No error should be thrown by the TypeScript compiler and the definitions should be shown correctly.
Actual behavior
The following error is thrown by the TypeScript compiler:
Could not find a declaration file for module 'feathers-localstorage'. '[...]/node_modules/feathers-localstorage/lib/index.js' implicitly has an 'any' type.
Try npm install @types/feathers-localstorage if it exists or add a new declaration (.d.ts) file containing declare module 'feathers-localstorage';
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working): 5.1.0
Steps to reproduce
npm i feathers-localstorage
).import
the package somewhere (import localstorage from 'feathers-localstorage'
).(First please check that this issue is not already solved as described here)
The definitions exist in the
types
folder, but they aren't referenced in thepackage.json
. This bug is fixed by adding"types": "types/"
to thepackage.json
file.Expected behavior
No error should be thrown by the TypeScript compiler and the definitions should be shown correctly.
Actual behavior
The following error is thrown by the TypeScript compiler:
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working): 5.1.0
NodeJS version: 12.6.1
Operating System: Windows 10 1909 64-Bit
Browser Version: Microsoft Edge 80.0.361.69
React Native Version: -
Module Loader: -