-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not find a declaration file for module with TypeScript #1208
Comments
The tree shakable path does not appear to be working |
@banjankri -- could you please help look into this, re: #1015 |
Related: #1204. Wish I had time to volunteer to convert this project to TypeScript. |
@steida would you be able to provide some further details on this issue please? Like typescript version used, tsconfig, whether you are using typings for this library etc. I am using the very same imports in a TS project and it seem to be working fine. Also exact version of validator.js used could help to pinpoint the culprit. |
As I wrote, try this example https://github.com/validatorjs/validator.js#tree-shakeable-es-imports
Still does not work for es6. |
Using exatly this import in my project. Upgraded to pointed versions of @steida Could you share some more information re your typescript/tsconfig please? Or provide sample repository ideally. |
Not sure if it helps, but removing the The way to go would be amending the typings for the library or as mentioned before converting it to typescript altogether. |
Remove 'strict' is nogo. Please, do not castrate TypeScript. |
Opened up a PR with DefinitelyTyped so castration should not be necessary :) |
@steida the PR got merged, please give it a go using the latest typings. |
@banjankri Great, TypeScript error is gone. Unfortunately, tree shakable path still does not appear to be working. |
But it's another error so I am closing this issue. Thank you. |
For
import isEmail from 'validator/es/lib/isEmail';'
Could not find a declaration file for module 'validator/es/lib/isEmail'`But for
import isEmail from 'validator/lib/isEmail';
It's ok.
The text was updated successfully, but these errors were encountered: