-
Notifications
You must be signed in to change notification settings - Fork 41
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
Missing type declarations #96
Comments
I've managed to build the package, the problem was the script: Anyways, it appears that the definition files get build, but are excluded in the package.json.
Is there a reason for doing that? |
We've been choosing to not publish the types used in yargs' on modules, as it interferes with the types published on DefinitelyTyped -- this decision was mostly motivated by |
Can you include documentation for use with TypeScript? seems like an incredibly common use-case |
Changing import statement to require statement fixed it for me |
DefinitelyTyped does not have types for To be clear, the main risk with publishing types in this package is breaking consumers of yargs, which is the biggest dependent on this package. So any insights on that risk are welcome. |
In my experience, the only correct way to move to TS from a DT-covered package is semver-major and delete the types from DT. Anything else is asking for headaches. DT is a decent stopgap for JS modules to allow them to be used within TS programs, but once it's written in TS, it's just unnecessary complexity and invariably falls out of sync. |
Hi, my project uses TypeScript, but after importing this package I get the following error:
I can see that there are no .d.ts files in the build folder of the published package, even though the package is written in TypeScript. I haven´t been able to compile the code on my machine, so I cannot investigate this further.
Can you enable building the declarations?
The text was updated successfully, but these errors were encountered: