From 4bf917b0ec88a95808db1d66f8dc7f9958b7e551 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Thu, 11 Apr 2019 10:46:21 -0700 Subject: [PATCH] fix(core): resolve ts compile issues due to lenient tsconfig The code failed presubmit in google3 because the original ts config was not as strict as the one used elsewhere in angular/angular and google3. --- packages/core/schematics/tsconfig.json | 5 ++++- packages/core/schematics/utils/typescript/visit_nodes.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/core/schematics/tsconfig.json b/packages/core/schematics/tsconfig.json index 4674d61f7bb67..2fccbe4bea203 100644 --- a/packages/core/schematics/tsconfig.json +++ b/packages/core/schematics/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { - "strictNullChecks": true, "noImplicitReturns": true, + "noImplicitAny": true, + "noFallthroughCasesInSwitch": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, "lib": ["es2015"], "types": [], "baseUrl": ".", diff --git a/packages/core/schematics/utils/typescript/visit_nodes.ts b/packages/core/schematics/utils/typescript/visit_nodes.ts index d6f9dbabdab62..f0553e8f5af27 100644 --- a/packages/core/schematics/utils/typescript/visit_nodes.ts +++ b/packages/core/schematics/utils/typescript/visit_nodes.ts @@ -8,7 +8,7 @@ import * as ts from 'typescript'; -export interface TypeScriptVisitor { visitNode(node: ts.Node); } +export interface TypeScriptVisitor { visitNode(node: ts.Node): void; } export function visitAllNodes(node: ts.Node, visitors: TypeScriptVisitor[]) { visitors.forEach(v => v.visitNode(node));