π Search Terms
infer return type import attributes
π Version & Regression Information
β― Playground Link
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.
π Search Terms
infer return type import attributes
π Version & Regression Information
β― Playground Link
Playground Link
π» Code
π Actual behavior
Using infer return type on
fnwill 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
ImportAttributesnot going through the full emit pipeline and thus not having their position assigned if they are part of an import type node.