2016-10-05 20:24:26 +02:00
|
|
|
// @experimentalDecorators: true
|
|
|
|
// @emitDecoratorMetadata: true
|
|
|
|
function PropDeco(target: Object, propKey: string | symbol) { }
|
|
|
|
|
|
|
|
class A {
|
|
|
|
}
|
|
|
|
|
|
|
|
class B {
|
|
|
|
@PropDeco
|
|
|
|
x: "foo" | A;
|
|
|
|
|
|
|
|
@PropDeco
|
|
|
|
y: true | boolean;
|
|
|
|
|
|
|
|
@PropDeco
|
|
|
|
z: "foo" | boolean;
|
2016-10-06 02:40:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
enum E {
|
|
|
|
A,
|
|
|
|
B,
|
|
|
|
C,
|
|
|
|
D
|
|
|
|
}
|
|
|
|
|
|
|
|
class D {
|
|
|
|
@PropDeco
|
|
|
|
a: E.A;
|
|
|
|
|
|
|
|
@PropDeco
|
|
|
|
b: E.B | E.C;
|
|
|
|
|
|
|
|
@PropDeco
|
|
|
|
c: E;
|
|
|
|
|
|
|
|
@PropDeco
|
|
|
|
d: E | number;
|
2016-10-05 20:24:26 +02:00
|
|
|
}
|