TypeScript/tests/baselines/reference/preserveValueImports_errors(isolatedmodules=false).types
Andrew Branch 8610ff5ebe
Add --preserveValueImports (#44619)
* Add compiler option

* Require es2015+

* Do not elide any imports or exports in preserve-exact

* Add errors for writing imports/exports that reference elided names

* Improve diagnostics wording

* Update API baselines

* Redo as noEraslingImportedNames

* Update option category

* Update baselines

* Lint

* Fix up transformer comments

* Fix errors from merge

* Update other error code baseline

* Rename to "preserveValueImports"

* Clean up, reword diagnostics

* Update API baselines

* Update other baseline affected by error message reword

* Update tsconfig baselines

* Add debug assertion instead of !
2021-09-08 16:30:22 -07:00

96 lines
2.2 KiB
Plaintext

=== tests/cases/conformance/externalModules/typeOnly/a.ts ===
export type A = {};
>A : A
export type { A as default };
>A : any
>default : A
=== tests/cases/conformance/externalModules/typeOnly/b.ts ===
class B {};
>B : B
export type { B, B as default };
>B : B
>B : typeof B
>default : B
=== tests/cases/conformance/externalModules/typeOnly/c.ts ===
import DefaultA from "./a";
>DefaultA : any
import { A } from "./a";
>A : any
import DefaultB from "./b";
>DefaultB : typeof DefaultB
import { B } from "./b";
>B : typeof DefaultB
=== tests/cases/conformance/externalModules/typeOnly/c.fixed.ts ===
import type DefaultA from "./a";
>DefaultA : DefaultA
import type { A } from "./a";
>A : DefaultA
import type DefaultB from "./b";
>DefaultB : DefaultB
import type { B } from "./b";
>B : DefaultB
=== tests/cases/conformance/externalModules/typeOnly/d.ts ===
export { A as AA } from "./a";
>A : any
>AA : any
export { B as BB } from "./b";
>B : typeof import("tests/cases/conformance/externalModules/typeOnly/b").B
>BB : typeof import("tests/cases/conformance/externalModules/typeOnly/b").B
=== tests/cases/conformance/externalModules/typeOnly/d.fixed.ts ===
export type { A as AA } from "./a";
>A : any
>AA : import("tests/cases/conformance/externalModules/typeOnly/a").A
export type { B as BB } from "./b";
>B : typeof import("tests/cases/conformance/externalModules/typeOnly/b").B
>BB : import("tests/cases/conformance/externalModules/typeOnly/b").B
=== tests/cases/conformance/externalModules/typeOnly/e.ts ===
import { AA, BB } from "./d";
>AA : any
>BB : typeof BB
=== tests/cases/conformance/externalModules/typeOnly/e.fixed.ts ===
import type { AA, BB } from "./d";
>AA : AA
>BB : BB
=== tests/cases/conformance/externalModules/typeOnly/f.ts ===
import type { A } from "./a";
>A : A
import type { B } from "./b";
>B : B
export { A, B as BB };
>A : any
>B : typeof B
>BB : typeof B
=== tests/cases/conformance/externalModules/typeOnly/f.fixed.ts ===
import type { A } from "./a";
>A : A
import type { B } from "./b";
>B : B
export type { A, B as BB };
>A : A
>B : typeof B
>BB : B