mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
23 lines
688 B
Plaintext
23 lines
688 B
Plaintext
/c.ts(4,1): error TS1361: 'A' cannot be used as a value because it was imported using 'import type'.
|
|
|
|
|
|
==== /c.ts (1 errors) ====
|
|
import type A = require('./a'); // Ok
|
|
import type = require('./b'); // Ok
|
|
|
|
A.prototype; // Error
|
|
~
|
|
!!! error TS1361: 'A' cannot be used as a value because it was imported using 'import type'.
|
|
!!! related TS1376 /c.ts:1:1: 'A' was imported here.
|
|
const a: A = { a: 'a' }; // Ok
|
|
void type; // Ok
|
|
export declare const AConstructor: typeof A; // Ok
|
|
|
|
==== /a.ts (0 errors) ====
|
|
class A { a!: string }
|
|
export = A;
|
|
|
|
==== /b.ts (0 errors) ====
|
|
class SomeClass {}
|
|
export = SomeClass;
|
|
|