You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ls node_modules/celebrate/lib/index.d.ts
node_modules/celebrate/lib/index.d.ts
$ ./node_modules/.bin/tsc
t.ts(1,28): error TS7016: Could not find a declaration file for module 'celebrate'. '/home/kostya/tmp/ts-test/node_modules/celebrate/lib/index.js' implicitly has an 'any' type.
Try `npm install @types/celebrate` if it exists or add a new declaration (.d.ts) file containing `declare module 'celebrate';`
1 import * as celebrate from 'celebrate';
~~~~~~~~~~~
For fix this need to add property types to package.json of Celebrate package:
{
+ "types": "./lib/index.d.ts"
}
The text was updated successfully, but these errors were encountered:
node
version - v8.6.0celebrate
version - 5.0.1joi
version (vianpm ls --depth=0 | grep joi
) -Explain the problem here
Now TypeScript declaration https://github.com/continuationlabs/celebrate/blob/master/lib/index.d.ts is presented in npm package, but can't be found by TypeScript compiler:
For fix this need to add property
types
topackage.json
ofCelebrate
package:{ + "types": "./lib/index.d.ts" }
The text was updated successfully, but these errors were encountered: