fix(ivy): split checkTypeOfReferences into DOM and non-DOM flags. (#33365)

View Engine correctly infers the type of local refs to directives or to
<ng-template>s, just not to DOM nodes. This commit splits the
checkTypeOfReferences flag into two separate halves, allowing the compiler
to align with this behavior.

PR Close #33365
This commit is contained in:
Alex Rickabaugh
2019-10-23 17:47:47 -07:00
committed by Andrew Kushnir
parent d8ce2129d5
commit 113411c9b0
5 changed files with 73 additions and 16 deletions

View File

@ -441,7 +441,8 @@ export class NgtscProgram implements api.Program {
// - error TS2531: Object is possibly 'null'.
// - error TS2339: Property 'value' does not exist on type 'EventTarget'.
checkTypeOfDomEvents: false,
checkTypeOfReferences: true,
checkTypeOfDomReferences: true,
checkTypeOfNonDomReferences: true,
checkTypeOfPipes: true,
strictSafeNavigationTypes: true,
};
@ -457,7 +458,8 @@ export class NgtscProgram implements api.Program {
checkTypeOfOutputEvents: false,
checkTypeOfAnimationEvents: false,
checkTypeOfDomEvents: false,
checkTypeOfReferences: false,
checkTypeOfDomReferences: false,
checkTypeOfNonDomReferences: false,
checkTypeOfPipes: false,
strictSafeNavigationTypes: false,
};