1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | function AllMethods(decorator) {
|
4 | return (target) => {
|
5 | Object.getOwnPropertyNames(target.prototype).forEach((key) => {
|
6 | const descriptor = Object.getOwnPropertyDescriptor(target.prototype, key);
|
7 | if (typeof descriptor.get !== 'undefined'
|
8 | || typeof descriptor.set !== 'undefined'
|
9 | || key === 'constructor'
|
10 | || key[0] === '_') {
|
11 | return;
|
12 | }
|
13 | const decoratorResult = decorator.call(target, target.prototype[key], key, descriptor);
|
14 | if (decoratorResult) {
|
15 | target.prototype[key] = decoratorResult;
|
16 | }
|
17 | });
|
18 | return target;
|
19 | };
|
20 | }
|
21 | exports.AllMethods = AllMethods;
|