Cannot find type declarations
simonihmig opened this issue · comments
I have no experience with the typesVersions
feature you used, but it does not work for me. Both in my IDE and when running tsc --noEmit
(TS 4.5.2) I get an error like this:
addon/resources/asset-container.ts:1:35 - error TS2307: Cannot find module 'ember-resources' or its corresponding type declarations.
import { LifecycleResource } from 'ember-resources';
When I change "declarations/*"
here to "declarations/index.d.ts"
, then it works. Same when replacing the whole typesVersions
with "types": "declarations/index.d.ts",
.
Any idea?
I mean, if changing to types works, maybe that's better?
If you were to submit a PR and ci is still green, it's probably a good change. Probably could remove a hack in the test app's tsconfig!
just kidding, I made a PR: #307
I wonder what the reason for this was, as a) the use of typesVersions
looks ok for me (skimming quickly over the docs), and b) you and others apparently didn't have such issues, right?
I think it's a secret breaking change in TS.
TS < 4.5 seems to have worked. but 4.5.1 does not 🤷
(my open source projects aren't as up to date as I'd like for "reasons" (canary stuff))
🎉 This issue has been resolved in version 4.1.2 🎉
The release is available on:
Your semantic-release bot 📦🚀