-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
TypeScript: Cannot find module 'diary' or its corresponding type declarations #11
Comments
Hi @abeforgit thanks for the issue! Yeah that isnt the greatest DX for sure. But in 0.1.4 we did release a fix that made it so the typings all work as it should. But in saying that i see you're using TypeScript 3 — maybe all i need to do is check when |
ah yes thatll be it |
I'd suggest adding to the README that currently only ts >4 is supported, I'd consider this issue as resolved then |
I don't think any of the TypeScript itself is a hard and fast v4+, do you mind helping me test this? Can you open up If that works we can surely raise a PR. |
Taking the version down works indeed, but it's not quite that simple. Taking the version down implies we would support that version of typescript, which is actually quite annoying to verify if we want to keep developing using the latest typescript compiler. According to this comment there are no plans to provide any native support for this in typescript. On the other hand, since this is really only an issue about types, not about functionality, it wouldn't be too bad to just kind of assume things will work and handle issues as they appear. Typescript should also be one of the easier packages to upgrade since as long as it compiles it shouldn't interfere with the way the program works. I had no idea packaging ts projects was this much of a pain 😅 this is my first experience with it |
In any case if you do end up going for it I'd suggest targeting 3.4 or higher, to keep the option for using downlevel-dts open |
Fyi I did end up just updating our typescript version to latest, it was not painful at all :) for me you can close this issue, maybe still add a hint in the readme that if people need support for lower versions they can raise an issue? |
While #9 is marked as solved, I still have that issue. However, the workaround mentioned there to add the module definition like so:
works well. So this is not really blocking, but it being a fully typescript library it's a bit weird to have to add these module definitions.
Environment
I am running a bit of a weird setup so this might be the cause
node: v14.16.0
npm: 6.4.11
typescript: 3.9.1-rc
It is also an emberJS project, which has its own rather opaque build system
The text was updated successfully, but these errors were encountered: