Bug: VSCode extension is setting path to typegen wrong
pixtron opened this issue · comments
Description
Typescripts requires "full extensions" for relative import paths in projects that target module: 'Node16'
or module: 'nodenext'
in tsconfig.
XState's typegen (used with XState VSCode) sets the import tsTypes: {} as import("./main.typegen").Typegen0
. This results in the TS Error: TS2307: Cannot find module './main.typegen' or its corresponding type declarations.
.
Whenever i add the full extension (import("./main.typegen.js").
) the VSCode extension removes the .js
again when i save the file.
Expected result
.js
extension stays.
Actual result
.js
extension is removed.
Reproduction
https://github.com/pixtron/xstate-typegen-node-esm-repro
Additional context
No response
In a way, it's a duplicate of #108
Closing this in favor of #108