Closed azygis closed 9 months ago
Hello @azygis, I'm not having this issue on other projects using TS 5+, so maybe the problem is related to something else? I'll take a look soon.
I'm not convinced myself that it's the only possible problem/solution. That's the first issue in this repo regarding such a problem - I would imagine someone to have already had this happen before me.
Sadly, I can't really find another way to fix it otherwise. By adding types to exports, it starts working fine.
For what is worth, I'm experiencing this both with TS 5.3.2 and 5.3.3. Sorry, cannot verify the other versions.
OK, I'll try this PR in a patch release soon and give feedback here! Stay tuned!
@azygis, fix release in v4.1.2
:tada:
Working on my applications.
package.json
does not containtypes
definition inexports
section, which is required with TS versions 4.7+. Fallback (the oldtypes
property directly in the file) works only as long as theexports
property isn't yet handled by TS (which is <4.7). Currently, with TS 5.3 (most likely any version since 4.7) import fails with this:It's enough to simply copy the
types
from root of the file and add it toexports
section.