mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
62 lines
1.8 KiB
Plaintext
62 lines
1.8 KiB
Plaintext
enumAssignmentCompat.ts(26,5): error TS2322: Type 'typeof W' is not assignable to type 'number'.
|
|
enumAssignmentCompat.ts(28,5): error TS2322: Type 'W' is not assignable to type 'typeof W'.
|
|
enumAssignmentCompat.ts(30,5): error TS2322: Type 'number' is not assignable to type 'typeof W'.
|
|
enumAssignmentCompat.ts(31,5): error TS2322: Type '4' is not assignable to type 'W.a'.
|
|
enumAssignmentCompat.ts(32,5): error TS2322: Type 'W' is not assignable to type 'WStatic'.
|
|
enumAssignmentCompat.ts(33,5): error TS2322: Type 'number' is not assignable to type 'WStatic'.
|
|
enumAssignmentCompat.ts(34,5): error TS2322: Type '3' is not assignable to type 'W'.
|
|
|
|
|
|
==== enumAssignmentCompat.ts (7 errors) ====
|
|
namespace W {
|
|
export class D { }
|
|
}
|
|
|
|
enum W {
|
|
|
|
a, b, c,
|
|
|
|
}
|
|
|
|
|
|
interface WStatic {
|
|
|
|
a: W;
|
|
|
|
b: W;
|
|
|
|
c: W;
|
|
|
|
}
|
|
|
|
|
|
|
|
var x: WStatic = W;
|
|
var y: typeof W = W;
|
|
var z: number = W; // error
|
|
~
|
|
!!! error TS2322: Type 'typeof W' is not assignable to type 'number'.
|
|
var a: number = W.a;
|
|
var b: typeof W = W.a; // error
|
|
~
|
|
!!! error TS2322: Type 'W' is not assignable to type 'typeof W'.
|
|
var c: typeof W.a = W.a;
|
|
var d: typeof W = 3; // error
|
|
~
|
|
!!! error TS2322: Type 'number' is not assignable to type 'typeof W'.
|
|
var e: typeof W.a = 4;
|
|
~
|
|
!!! error TS2322: Type '4' is not assignable to type 'W.a'.
|
|
var f: WStatic = W.a; // error
|
|
~
|
|
!!! error TS2322: Type 'W' is not assignable to type 'WStatic'.
|
|
var g: WStatic = 5; // error
|
|
~
|
|
!!! error TS2322: Type 'number' is not assignable to type 'WStatic'.
|
|
var h: W = 3;
|
|
~
|
|
!!! error TS2322: Type '3' is not assignable to type 'W'.
|
|
var i: W = W.a;
|
|
i = W.a;
|
|
W.D;
|
|
var p: W.D; |