mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
46 lines
1.9 KiB
Plaintext
46 lines
1.9 KiB
Plaintext
/c.ts(2,16): error TS1362: 'A' cannot be used as a value because it was exported using 'export type'.
|
|
/c.ts(3,17): error TS1362: 'B' cannot be used as a value because it was exported using 'export type'.
|
|
/e.ts(2,16): error TS1362: 'A' cannot be used as a value because it was exported using 'export type'.
|
|
/e.ts(3,17): error TS1362: 'B' cannot be used as a value because it was exported using 'export type'.
|
|
/e.ts(4,18): error TS1362: 'C' cannot be used as a value because it was exported using 'export type'.
|
|
|
|
|
|
==== /a.ts (0 errors) ====
|
|
export class A {}
|
|
export class B {}
|
|
export class C {}
|
|
|
|
==== /b.ts (0 errors) ====
|
|
export type * from "./a";
|
|
export class C {}
|
|
|
|
==== /c.ts (2 errors) ====
|
|
import { A, B, C } from "./b";
|
|
let _: A = new A(); // Error
|
|
~
|
|
!!! error TS1362: 'A' cannot be used as a value because it was exported using 'export type'.
|
|
!!! related TS1377 /b.ts:1:1: 'A' was exported here.
|
|
let __: B = new B(); // Error
|
|
~
|
|
!!! error TS1362: 'B' cannot be used as a value because it was exported using 'export type'.
|
|
!!! related TS1377 /b.ts:1:1: 'B' was exported here.
|
|
let ___: C = new C(); // Ok
|
|
|
|
==== /d.ts (0 errors) ====
|
|
export type * from "./b";
|
|
|
|
==== /e.ts (3 errors) ====
|
|
import { A, B, C } from "./d";
|
|
let _: A = new A(); // Error
|
|
~
|
|
!!! error TS1362: 'A' cannot be used as a value because it was exported using 'export type'.
|
|
!!! related TS1377 /d.ts:1:1: 'A' was exported here.
|
|
let __: B = new B(); // Error
|
|
~
|
|
!!! error TS1362: 'B' cannot be used as a value because it was exported using 'export type'.
|
|
!!! related TS1377 /d.ts:1:1: 'B' was exported here.
|
|
let ___: C = new C(); // Error
|
|
~
|
|
!!! error TS1362: 'C' cannot be used as a value because it was exported using 'export type'.
|
|
!!! related TS1377 /d.ts:1:1: 'C' was exported here.
|
|
|