2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/objectLitGetterSetter.ts ===
|
|
|
|
var obj = {};
|
|
|
|
>obj : {}
|
|
|
|
>{} : {}
|
|
|
|
|
|
|
|
Object.defineProperty(obj, "accProperty", <PropertyDescriptor>({
|
2014-08-22 03:39:46 +02:00
|
|
|
>Object.defineProperty(obj, "accProperty", <PropertyDescriptor>({ get: function () { eval("public = 1;"); return 11; }, set: function (v) { } })) : any
|
2014-08-15 23:33:16 +02:00
|
|
|
>Object.defineProperty : (o: any, p: string, attributes: PropertyDescriptor) => any
|
2014-10-29 05:21:47 +01:00
|
|
|
>Object : ObjectConstructor
|
2014-08-15 23:33:16 +02:00
|
|
|
>defineProperty : (o: any, p: string, attributes: PropertyDescriptor) => any
|
|
|
|
>obj : {}
|
2014-08-22 03:39:46 +02:00
|
|
|
><PropertyDescriptor>({ get: function () { eval("public = 1;"); return 11; }, set: function (v) { } }) : PropertyDescriptor
|
2014-08-15 23:33:16 +02:00
|
|
|
>PropertyDescriptor : PropertyDescriptor
|
2014-08-22 03:39:46 +02:00
|
|
|
>({ get: function () { eval("public = 1;"); return 11; }, set: function (v) { } }) : { get: () => number; set: (v: any) => void; }
|
|
|
|
>{ get: function () { eval("public = 1;"); return 11; }, set: function (v) { } } : { get: () => number; set: (v: any) => void; }
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
get: function () {
|
|
|
|
>get : () => number
|
2014-08-22 03:39:46 +02:00
|
|
|
>function () { eval("public = 1;"); return 11; } : () => number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
eval("public = 1;");
|
|
|
|
>eval("public = 1;") : any
|
2014-08-28 21:52:44 +02:00
|
|
|
>eval : (x: string) => any
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
return 11;
|
|
|
|
},
|
|
|
|
set: function (v) {
|
|
|
|
>set : (v: any) => void
|
2014-08-22 03:39:46 +02:00
|
|
|
>function (v) { } : (v: any) => void
|
2014-08-15 23:33:16 +02:00
|
|
|
>v : any
|
|
|
|
}
|
|
|
|
}))
|
|
|
|
|