|
| 1 | +//// [decoratorOnClassMethod12.ts] |
| 2 | +module M { |
| 3 | + class S { |
| 4 | + decorator(target: Object, key: string): void { } |
| 5 | + } |
| 6 | + class C extends S { |
| 7 | + @super.decorator |
| 8 | + method() { } |
| 9 | + } |
| 10 | +} |
| 11 | + |
| 12 | +//// [decoratorOnClassMethod12.js] |
| 13 | +var __extends = this.__extends || function (d, b) { |
| 14 | + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; |
| 15 | + function __() { this.constructor = d; } |
| 16 | + __.prototype = b.prototype; |
| 17 | + d.prototype = new __(); |
| 18 | +}; |
| 19 | +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { |
| 20 | + switch (arguments.length) { |
| 21 | + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); |
| 22 | + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); |
| 23 | + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); |
| 24 | + } |
| 25 | +}; |
| 26 | +var M; |
| 27 | +(function (M) { |
| 28 | + var S = (function () { |
| 29 | + function S() { |
| 30 | + } |
| 31 | + S.prototype.decorator = function (target, key) { }; |
| 32 | + return S; |
| 33 | + })(); |
| 34 | + var C = (function (_super) { |
| 35 | + __extends(C, _super); |
| 36 | + function C() { |
| 37 | + _super.apply(this, arguments); |
| 38 | + } |
| 39 | + C.prototype.method = function () { }; |
| 40 | + Object.defineProperty(C.prototype, "method", |
| 41 | + __decorate([ |
| 42 | + _super.decorator |
| 43 | + ], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); |
| 44 | + return C; |
| 45 | + })(S); |
| 46 | +})(M || (M = {})); |
0 commit comments