-
Notifications
You must be signed in to change notification settings - Fork 15
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 'tai-password-strength' #19
Comments
Do you use TypeScript? If so, we could use a contribution to add typings to the JavaScript library. |
Well I use TypeScript but I've never generated a typings file or uploaded any library to npm. This page describes the process, it does not seem very complicated: https://www.typescriptlang.org/docs/handbook/declaration-files/dts-from-js.html |
Are you trying this or do you want me to do a pull request? |
I am not planning on creating a TypeScript file at this moment. I have no
spare time in the near future because of events in my personal life.
…--
Tyler Akins
On Tue, Feb 23, 2021 at 5:01 PM S3curityBug ***@***.***> wrote:
Are you trying this or do you want me to do a pull request?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADISPAWUVEPH4A4HIQORHLTAQXUNANCNFSM4YBGQKHQ>
.
|
All right. I cloned this repository and tried the steps in the link. It failed, showing this error: lib/password-strength.js:6:1 - error TS9005: Declaration emit for this file requires using private name 'PasswordStrength'. An explicit type annotation may unblock declaration emit. It seems a bug in typescript: microsoft/TypeScript#37832 Apparently it will be fixed in the next version. I'll try again in a couple of weeks. |
I had a little time to make this version of
|
It worked! I just had to paste that code into lib/node.d.ts (not index.d.ts) |
Published a new version with updated dependencies and the TypeScript file. Would you please confirm it worked? |
I just tested it. It works. Thank you! |
Thanks for the help! |
Hello.
I'm using this library in the browser. I installed it with npm i tai-password-strength, and I'm getting this warning:
Could not find a declaration file for module 'tai-password-strength'. 'path/to/project/node_modules/tai-password-strength/lib/node.js' implicitly has an 'any' type. Try
npm install @types/tai-password-strength
if it exists or add a new declaration (.d.ts) file containingdeclare module 'tai-password-strength';
Everything works fine, but I don't like having the warning... could you take a look at it?
The text was updated successfully, but these errors were encountered: