1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var tslib_1 = require("tslib");
|
4 | var NodePatcher_1 = require("./NodePatcher");
|
5 | var PassthroughPatcher = (function (_super) {
|
6 | tslib_1.__extends(PassthroughPatcher, _super);
|
7 | function PassthroughPatcher(patcherContext) {
|
8 | var children = [];
|
9 | for (var _i = 1; _i < arguments.length; _i++) {
|
10 | children[_i - 1] = arguments[_i];
|
11 | }
|
12 | var _this = _super.call(this, patcherContext) || this;
|
13 | _this.children = children;
|
14 | return _this;
|
15 | }
|
16 | PassthroughPatcher.prototype.patchAsExpression = function () {
|
17 | this.children.forEach(function (child) {
|
18 | if (Array.isArray(child)) {
|
19 | child.forEach(function (child) { return child && child.patch(); });
|
20 | }
|
21 | else if (child) {
|
22 | child.patch();
|
23 | }
|
24 | });
|
25 | };
|
26 | PassthroughPatcher.prototype.isRepeatable = function () {
|
27 | return true;
|
28 | };
|
29 | return PassthroughPatcher;
|
30 | }(NodePatcher_1.default));
|
31 | exports.default = PassthroughPatcher;
|