Incorrect .js
suffix added to named module import in declaration files.
#60930
Labels
Won't Fix
The severity and priority of this issue do not warrant the time or complexity needed to fix it
🔎 Search Terms
declaration js extension named module node10
🕗 Version & Regression Information
⏯ Playground Link
Not possible because repro requires multiple files.
💻 Code
🙁 Actual behavior
The generated
.d.ts
file hasbut this is invalid because there is no named export of
@noble/curves/_shortw_utils.js
. In particular, there.js
suffix should not be added.🙂 Expected behavior
The generated
.d.ts
file doesn't include an extraneous.js
on the dynamic import statement.Additional information about the issue
The reason I think this is a bug and not just some esoteric behavior of
node10
module resolution is that if you do not importother.js
, it correctly emits the following line instead (note the missing.js
extension):Either it is correct with the
.js
extension (a Node10 module resolution thing), or it is correct without the.js
extension, but it doesn't make sense that the presence of an extension would changed based on whether or not a local file was imported.Note: Bug does not reproduce if you import from another package. It only seems to occur if you import from a relative path (which is why there is no playground repro).
The text was updated successfully, but these errors were encountered: