From bbff7403fbf46f9ad92240ac213df8d30ef31b64 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 20 Sep 2018 02:56:13 +0200 Subject: update packages --- node_modules/tslint/lib/rules/noThisAssignmentRule.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'node_modules/tslint/lib/rules/noThisAssignmentRule.js') diff --git a/node_modules/tslint/lib/rules/noThisAssignmentRule.js b/node_modules/tslint/lib/rules/noThisAssignmentRule.js index 5d509faa8..df581bdb8 100644 --- a/node_modules/tslint/lib/rules/noThisAssignmentRule.js +++ b/node_modules/tslint/lib/rules/noThisAssignmentRule.js @@ -17,6 +17,7 @@ */ Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); +var _a, _b; var utils = require("tsutils"); var ts = require("typescript"); var Lint = require("../index"); @@ -71,9 +72,8 @@ var Rule = /** @class */ (function (_super) { _b), type: "object", }, - optionsDescription: (_c = ["\n Two options may be provided on an object:\n\n * `", "` allows using destructuring to access members of `this` (e.g. `{ foo, bar } = this;`).\n * `", "` may be specified as a list of regular expressions to match allowed variable names."], _c.raw = ["\n Two options may be provided on an object:\n\n * \\`", "\\` allows using destructuring to access members of \\`this\\` (e.g. \\`{ foo, bar } = this;\\`).\n * \\`", "\\` may be specified as a list of regular expressions to match allowed variable names."], Lint.Utils.dedent(_c, ALLOW_THIS_DESTRUCTURING, ALLOWED_THIS_NAMES)), - rationale: "Assigning a variable to `this` instead of properly using arrow lambdas " - + "may be a symptom of pre-ES6 practices or not manging scope well.", + optionsDescription: Lint.Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n Two options may be provided on an object:\n\n * `", "` allows using destructuring to access members of `this` (e.g. `{ foo, bar } = this;`).\n * `", "` may be specified as a list of regular expressions to match allowed variable names."], ["\n Two options may be provided on an object:\n\n * \\`", "\\` allows using destructuring to access members of \\`this\\` (e.g. \\`{ foo, bar } = this;\\`).\n * \\`", "\\` may be specified as a list of regular expressions to match allowed variable names."])), ALLOW_THIS_DESTRUCTURING, ALLOWED_THIS_NAMES), + rationale: Lint.Utils.dedent(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n Assigning a variable to `this` instead of properly using arrow lambdas may be a symptom of pre-ES6 practices\n or not managing scope well.\n\n Instead of storing a reference to `this` and using it inside a `function () {`:\n\n ```\n const self = this;\n\n setTimeout(function () {\n self.doWork();\n });\n ```\n\n Use `() =>` arrow lambdas, as they preserve `this` scope for you:\n\n ```\n setTimeout(() => {\n this.doWork();\n });\n ```\n "], ["\n Assigning a variable to \\`this\\` instead of properly using arrow lambdas may be a symptom of pre-ES6 practices\n or not managing scope well.\n\n Instead of storing a reference to \\`this\\` and using it inside a \\`function () {\\`:\n\n \\`\\`\\`\n const self = this;\n\n setTimeout(function () {\n self.doWork();\n });\n \\`\\`\\`\n\n Use \\`() =>\\` arrow lambdas, as they preserve \\`this\\` scope for you:\n\n \\`\\`\\`\n setTimeout(() => {\n this.doWork();\n });\n \\`\\`\\`\n "]))), ruleName: "no-this-assignment", type: "functionality", typescriptOnly: false, @@ -125,4 +125,4 @@ var NoThisAssignmentWalker = /** @class */ (function (_super) { }; return NoThisAssignmentWalker; }(Lint.AbstractWalker)); -var _a, _b, _c; +var templateObject_1, templateObject_2; -- cgit v1.2.3