-
-
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
Add type definitions to exports in package.json #21
Conversation
Hi @mrdrogdrog, thanks for the PRs! I didn't know that you can add a Usually - or so I thought - typescript checks whether there is a Can you please verify that this works by applying the changes from this PR to the Could you also please tell me what kind of TS setup you are using (or TS version)? This is more for my own sanity. It might even motivate me to maintain the |
Good evening @dmonad,
Thanks for the lib 👉 😎 👉
Neither did I until one of my projects exploded and I read the docs) for named exports.
That's true usually typescript do so and it works fine. But the exploded project uses ts-jest which explictly wants to import the cjs version of the lib even though my project is a module. sigh anyway.
.... found out that this isn't true 🙃 . There are no declaration files in the dist folder. Or at least not in the package that I downloaded from npm.
It works. With this patch ts-jest found the declarations and did its job.
I use the latest typescript version 4.7.4. Or what do you mean with setup? 🤔 |
Anything new? |
Hey. @dmonad I really need this change. Can you please take a look again? :/ |
3479ad6
to
9c28aa5
Compare
Sorry for the long wait. Will get this into a new release once #27 is ready |
The package doesn't explicitly export the generated typescript definitions.
This PR adds the type definition files to the exports in the package.json
I hope to solve this problem with that 😅