feat(ivy): disable strict null checks for input bindings (#33066)
This commit introduces an internal config option of the template type checker that allows to disable strict null checks of input bindings to directives. This may be particularly useful when a directive is from a library that is not compiled with `strictNullChecks` enabled. Right now, strict null checks are enabled when `fullTemplateTypeCheck` is turned on, and disabled when it's off. In the near future, several of the internal configuration options will be added as public Angular compiler options so that users can have fine-grained control over which areas of the template type checker to enable, allowing for a more incremental migration strategy. PR Close #33066
This commit is contained in:
@ -401,6 +401,7 @@ export class NgtscProgram implements api.Program {
|
||||
checkQueries: false,
|
||||
checkTemplateBodies: true,
|
||||
checkTypeOfInputBindings: true,
|
||||
strictNullInputBindings: true,
|
||||
// Even in full template type-checking mode, DOM binding checks are not quite ready yet.
|
||||
checkTypeOfDomBindings: false,
|
||||
checkTypeOfPipes: true,
|
||||
@ -412,6 +413,7 @@ export class NgtscProgram implements api.Program {
|
||||
checkQueries: false,
|
||||
checkTemplateBodies: false,
|
||||
checkTypeOfInputBindings: false,
|
||||
strictNullInputBindings: false,
|
||||
checkTypeOfDomBindings: false,
|
||||
checkTypeOfPipes: false,
|
||||
strictSafeNavigationTypes: false,
|
||||
|
Reference in New Issue
Block a user