aboutsummaryrefslogtreecommitdiff
path: root/node_modules/tslint/lib/rules/noObjectLiteralTypeAssertionRule.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/tslint/lib/rules/noObjectLiteralTypeAssertionRule.js')
-rw-r--r--node_modules/tslint/lib/rules/noObjectLiteralTypeAssertionRule.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/node_modules/tslint/lib/rules/noObjectLiteralTypeAssertionRule.js b/node_modules/tslint/lib/rules/noObjectLiteralTypeAssertionRule.js
index 1690165bd..1cad0a6d3 100644
--- a/node_modules/tslint/lib/rules/noObjectLiteralTypeAssertionRule.js
+++ b/node_modules/tslint/lib/rules/noObjectLiteralTypeAssertionRule.js
@@ -31,8 +31,8 @@ var Rule = /** @class */ (function (_super) {
/* tslint:disable:object-literal-sort-keys */
Rule.metadata = {
ruleName: "no-object-literal-type-assertion",
- description: (_a = ["\n Forbids an object literal to appear in a type assertion expression.\n Casting to `any` is still allowed."], _a.raw = ["\n Forbids an object literal to appear in a type assertion expression.\n Casting to \\`any\\` is still allowed."], Lint.Utils.dedent(_a)),
- rationale: (_b = ["\n Always prefer `const x: T = { ... };` to `const x = { ... } as T;`.\n The type assertion in the latter case is either unnecessary or hides an error.\n The compiler will warn for excess properties with this syntax, but not missing required fields.\n For example: `const x: { foo: number } = {}` will fail to compile, but\n `const x = {} as { foo: number }` will succeed."], _b.raw = ["\n Always prefer \\`const x: T = { ... };\\` to \\`const x = { ... } as T;\\`.\n The type assertion in the latter case is either unnecessary or hides an error.\n The compiler will warn for excess properties with this syntax, but not missing required fields.\n For example: \\`const x: { foo: number } = {}\\` will fail to compile, but\n \\`const x = {} as { foo: number }\\` will succeed."], Lint.Utils.dedent(_b)),
+ description: Lint.Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n Forbids an object literal to appear in a type assertion expression.\n Casting to `any` is still allowed."], ["\n Forbids an object literal to appear in a type assertion expression.\n Casting to \\`any\\` is still allowed."]))),
+ rationale: Lint.Utils.dedent(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n Always prefer `const x: T = { ... };` to `const x = { ... } as T;`.\n The type assertion in the latter case is either unnecessary or hides an error.\n The compiler will warn for excess properties with this syntax, but not missing required fields.\n For example: `const x: { foo: number } = {}` will fail to compile, but\n `const x = {} as { foo: number }` will succeed."], ["\n Always prefer \\`const x: T = { ... };\\` to \\`const x = { ... } as T;\\`.\n The type assertion in the latter case is either unnecessary or hides an error.\n The compiler will warn for excess properties with this syntax, but not missing required fields.\n For example: \\`const x: { foo: number } = {}\\` will fail to compile, but\n \\`const x = {} as { foo: number }\\` will succeed."]))),
optionsDescription: "Not configurable.",
options: null,
optionExamples: [true],
@@ -53,4 +53,4 @@ function walk(ctx) {
return ts.forEachChild(node, cb);
});
}
-var _a, _b;
+var templateObject_1, templateObject_2;