-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
Milestone
Description
🔎 Search Terms
infer return type import attributes
🕗 Version & Regression Information
- This is a crash
⏯ Playground Link
💻 Code
// @module: NodeNext
// @filename: node_modules/inner/index.d.mts
export const esm = true;
// @filename: node_modules/inner/package.json
{ "name": "inner", "exports": { "./mjs": "./index.mjs" } }
// @filename: foo.ts
export /*a*/function/*b*/ fn() {
return import("inner/mjs")
}🙁 Actual behavior
Using infer return type on fn will cause a debug assertion.
🙂 Expected behavior
Should infer the return type.
Additional information about the issue
Found while working on isolated declaration.
It's caused by ImportAttributes not going through the full emit pipeline and thus not having their position assigned if they are part of an import type node.
robpalme