2017-11-30 00:57:11 +01:00
|
|
|
namespace Test1 {
|
|
|
|
enum Color {
|
|
|
|
Red,
|
|
|
|
Green,
|
|
|
|
Blue
|
|
|
|
}
|
|
|
|
|
|
|
|
type C1 = Color;
|
|
|
|
type C2 = typeof Color;
|
|
|
|
|
|
|
|
let a1: Color.Red.toString;
|
|
|
|
let a2: Color.Red["toString"];
|
|
|
|
let a3: Color["Red"]["toString"];
|
|
|
|
|
|
|
|
//let b1: (typeof Color).Red.toString;
|
|
|
|
//let b2: (typeof Color).Red["toString"];
|
|
|
|
let b3: (typeof Color)["Red"]["toString"];
|
|
|
|
|
2017-11-30 02:48:58 +01:00
|
|
|
let c1: C1.Red.toString;
|
|
|
|
let c2: C1.Red["toString"];
|
2017-11-30 00:57:11 +01:00
|
|
|
let c3: C1["Red"]["toString"];
|
|
|
|
|
2017-11-30 02:48:58 +01:00
|
|
|
let d1: C2.Red.toString;
|
|
|
|
let d2: C2.Red["toString"];
|
2017-11-30 00:57:11 +01:00
|
|
|
let d3: C2["Red"]["toString"];
|
|
|
|
}
|