-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Broken on TypeScript #763
Comments
Seems it's only broken with |
Hey @spiff-radio, your error seems really strange, as it says |
This is actually what happens if I disable |
I am running into this issue as well using this library in a project that has strict mode enabled. I believe the overall issue here is that The way around this in my experience is building your
Currently, your compiled project files as well as your source code is all contained in the If you are open to this change I'd be happy to take a stab at. It might necessitate a major version bump though because existing typescript projects might already be relying on importing ts modules directly...? Not quite sure. |
If this project would be elevated to strict type script, I expect you issues would disappear. |
@Borewit configuring typescript to build in strict mode would solve the immediate problem yeah! I still believe that it'll be easier to maintain long-term by building and shipping your compiled distribution code in the NPM package and not included your typescript source files.
My PR #783 gets a functional version of this type of build process, but it likely interrupts your dev workflow and such so I am not sure I can take it much farther. I would be happy to help with this if it is of interest to you. For the time being I am using a fork of this package so that I can use it in my typescript projects. |
I totally agree, in fact I was not aware of that I did, that is simply a bug. |
@Borewit I just installed v11 and it works as expected! Your solution to exclude ts via the Thank you for the quick and helpful work on this! I will close my PR 👍 |
Thanks for pointing out this problem @nfadili . I applied this way convention of distribution configuration in most of my projects, but apparently I forgot to adapt this part in this repository. |
working now, thanks ! |
Hello, I am trying to use this package with TypeScript, but starting my application fails. I posted the log on Pastebin, because it's too long to include here: https://pastebin.com/Dn7VT1gG
To reproduce this, simply trying to run any Node project using this TypeScript with this package should be enough.
The text was updated successfully, but these errors were encountered: