2015-03-25 01:00:29 +01:00
|
|
|
//// [decoratorOnClassMethod10.ts]
|
2015-03-17 22:06:06 +01:00
|
|
|
declare function dec(target: Function, paramIndex: number): void;
|
|
|
|
|
|
|
|
class C {
|
|
|
|
@dec method() {}
|
2015-03-25 01:00:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//// [decoratorOnClassMethod10.js]
|
|
|
|
var __decorate = this.__decorate || function (decorators, target, key, value) {
|
|
|
|
var kind = typeof (arguments.length == 2 ? value = target : value);
|
|
|
|
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
|
|
var decorator = decorators[i];
|
|
|
|
switch (kind) {
|
|
|
|
case "function": value = decorator(value) || value; break;
|
|
|
|
case "number": decorator(target, key, value); break;
|
|
|
|
case "undefined": decorator(target, key); break;
|
|
|
|
case "object": value = decorator(target, key, value) || value; break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return value;
|
|
|
|
};
|
2015-03-26 02:12:57 +01:00
|
|
|
var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } };
|
2015-03-25 01:00:29 +01:00
|
|
|
var C = (function () {
|
|
|
|
function C() {
|
|
|
|
}
|
2015-03-26 21:46:35 +01:00
|
|
|
C.prototype.method = function () { };
|
2015-03-18 01:09:39 +01:00
|
|
|
Object.defineProperty(C.prototype, "method", __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method")));
|
2015-03-25 01:00:29 +01:00
|
|
|
return C;
|
|
|
|
})();
|