refactor(compiler): tighten type of TemplateParser._console (#36741)

This property can actually be `null` when called from the language-service.
This change allows us to remove the use of `!` to subvert the type system.

PR Close #36741
This commit is contained in:
Pete Bacon Darwin
2020-04-26 18:15:43 +01:00
committed by Andrew Kushnir
parent 7c8c41353b
commit 4172707346
2 changed files with 4 additions and 4 deletions

View File

@ -516,8 +516,8 @@ export class TypeScriptServiceHost implements LanguageServiceHost {
const parser = new TemplateParser(
new CompilerConfig(), this.reflector, expressionParser, new DomElementSchemaRegistry(),
htmlParser,
null!, // console
[] // tranforms
null, // console
[] // tranforms
);
const htmlResult = htmlParser.parse(template.source, fileName, {
tokenizeExpansionForms: true,