Fix reference marking of values merged with unresolvable type-only imports (#54799)

This commit is contained in:
Andrew Branch
2023-08-03 11:09:50 -07:00
committed by GitHub
parent 3a7a4d4b51
commit 36ac4eb700
26 changed files with 511 additions and 53 deletions

View File

@@ -620,4 +620,16 @@ export * as alias from './file';`, {
testVerbatimModuleSyntax: true
}
);
transpilesCorrectly("Preserves exported const merged with type-only import", `
import fooValue from "./values";
import type {Foo} from "./types";
const Foo: Foo = fooValue as any as Foo;
export {Foo};
`, {
options: { compilerOptions: { module: ts.ModuleKind.ESNext, target: ts.ScriptTarget.ESNext } },
testVerbatimModuleSyntax: true
});
});