fix(core): resolve ts compile issues due to lenient tsconfig (#29843)

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.

PR Close #29843
This commit is contained in:
Igor Minar 2019-04-11 10:46:21 -07:00
parent 91c7b451d5
commit 54058ba3a7
2 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,10 @@
{ {
"compilerOptions": { "compilerOptions": {
"strictNullChecks": true,
"noImplicitReturns": true, "noImplicitReturns": true,
"noImplicitAny": true,
"noFallthroughCasesInSwitch": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"lib": ["es2015"], "lib": ["es2015"],
"types": [], "types": [],
"baseUrl": ".", "baseUrl": ".",

View File

@ -8,7 +8,7 @@
import * as ts from 'typescript'; 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[]) { export function visitAllNodes(node: ts.Node, visitors: TypeScriptVisitor[]) {
visitors.forEach(v => v.visitNode(node)); visitors.forEach(v => v.visitNode(node));