tsc-alias icon indicating copy to clipboard operation
tsc-alias copied to clipboard

tsc-alias does not properly replace aliases in declaration files when using a build with emitDeclarationOnly

Open stof opened this issue 2 years ago • 1 comments

All replacements get reported as Invalid path in the debug output.

I suspect that the resolver tries to check the existence of the target file. When replacing in a declaration file, it would be great if the check could accept a case where we only have a declaration file for the target file (even if the file does not exist).

stof avatar Aug 31 '23 11:08 stof

this happens when the aliases in the tsconfig.json file look like "display-svg": ["./src/dispay/svg.js"]. If I remove the .js extension from the alias, the path is accepted as valid.

stof avatar Aug 31 '23 11:08 stof