mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
27 lines
1015 B
Plaintext
27 lines
1015 B
Plaintext
/c.ts(2,1): error TS2308: Module "./a" has already exported a member named 'B'. Consider explicitly re-exporting to resolve the ambiguity.
|
|
/d.ts(2,16): error TS1362: 'A' cannot be used as a value because it was exported using 'export type'.
|
|
|
|
|
|
==== /a.ts (0 errors) ====
|
|
export class A {}
|
|
export class B {}
|
|
|
|
==== /b.ts (0 errors) ====
|
|
export class B {}
|
|
export class C {}
|
|
|
|
==== /c.ts (1 errors) ====
|
|
export type * from "./a";
|
|
export * from "./b"; // Collision error
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2308: Module "./a" has already exported a member named 'B'. Consider explicitly re-exporting to resolve the ambiguity.
|
|
|
|
==== /d.ts (1 errors) ====
|
|
import { A, B, C } from "./c";
|
|
let _: A = new A(); // Error
|
|
~
|
|
!!! error TS1362: 'A' cannot be used as a value because it was exported using 'export type'.
|
|
!!! related TS1377 /c.ts:1:1: 'A' was exported here.
|
|
let __: B = new B(); // Ok
|
|
let ___: C = new C(); // Ok
|
|
|