Closed burtek closed 1 year ago
You can push this forward by forking and try to create a bugfix PR Otherwise you need to wait some days until I'm back in "working-mode" I'm currently enjoying the last days of my vacation and grind Diablo 4 😅
@Shinigami92 happy to take a look tomorrow evening once I'm back from in-laws 😅
I now had the first time after vacation to test your issue and somehow I cannot reproduce your problem 🤔
@Shinigami92 what TS version were you testing this on?
Tried playing with it (both changing TS version, my configuration and your package.json) and can't figure out what's wrong with it...
When a file is considered an ES module, a few different rules come into play compared to CommonJS:
- relative import paths need full extensions (e.g we have to write import "./foo.js" instead of import "./foo")
https://www.typescriptlang.org/docs/handbook/esm-node.html#type-in-packagejson-and-new-extensions
It started working correctly for me when I changed your .d.ts files to contain extensions. I think that's the issue here. But still interested of your setup, since you're saying it works for you as is?
I have just a normal TypeScript esm project
I'm sorry I have not the time to debug your problems if you cannot provide a minimal reproducible
Also it starts to sound like it's a problem with your tsconfig or whatever
So I think I will close this issue for now Feel free to reopen when you provide a minimal reproducible
FFR the issue is that my project was set to have module resolution "Node16" while eslint-define-config
is "Node" (a.k.a. "Node10") and those two don't play well.
After #204 was merged and released in 1.21.0, I can't do any type imports, i.e:
Works correctly for 1.20.0