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:
parent
91c7b451d5
commit
54058ba3a7
|
@ -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": ".",
|
||||||
|
|
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue