diff --git a/packages/compiler-cli/src/ngtsc/core/src/compiler.ts b/packages/compiler-cli/src/ngtsc/core/src/compiler.ts index 7d10589ce27..de401e60e39 100644 --- a/packages/compiler-cli/src/ngtsc/core/src/compiler.ts +++ b/packages/compiler-cli/src/ngtsc/core/src/compiler.ts @@ -1089,33 +1089,32 @@ export class NgCompiler { let typeCheckingConfig: TypeCheckingConfig; if (strictTemplates) { typeCheckingConfig = { - applyTemplateContextGuards: strictTemplates, - checkQueries: false, + applyTemplateContextGuards: true, checkTemplateBodies: true, alwaysCheckSchemaInTemplateBodies: true, - checkTypeOfInputBindings: strictTemplates, + checkTypeOfInputBindings: true, honorAccessModifiersForInputBindings: false, checkControlFlowBodies: true, - strictNullInputBindings: strictTemplates, - checkTypeOfAttributes: strictTemplates, + strictNullInputBindings: true, + checkTypeOfAttributes: true, // Even in full template type-checking mode, DOM binding checks are not quite ready yet. checkTypeOfDomBindings: false, - checkTypeOfOutputEvents: strictTemplates, - checkTypeOfAnimationEvents: strictTemplates, + checkTypeOfOutputEvents: true, + checkTypeOfAnimationEvents: true, // Checking of DOM events currently has an adverse effect on developer experience, // e.g. for `` enabling this check results in: // - error TS2531: Object is possibly 'null'. // - error TS2339: Property 'value' does not exist on type 'EventTarget'. - checkTypeOfDomEvents: strictTemplates, + checkTypeOfDomEvents: true, checkUnclaimedEventNames: false, // 3p-only - // g3-only checkUnclaimedEventNames: strictTemplates, - checkTypeOfDomReferences: strictTemplates, + // g3-only checkUnclaimedEventNames: true, + checkTypeOfDomReferences: true, // Non-DOM references have the correct type in View Engine so there is no strictness flag. checkTypeOfNonDomReferences: true, // Pipes are checked in View Engine so there is no strictness flag. checkTypeOfPipes: true, - strictSafeNavigationTypes: strictTemplates, - useContextGenericType: strictTemplates, + strictSafeNavigationTypes: true, + useContextGenericType: true, strictLiteralTypes: true, enableTemplateTypeChecker: this.enableTemplateTypeChecker, useInlineTypeConstructors, @@ -1129,7 +1128,6 @@ export class NgCompiler { } else { typeCheckingConfig = { applyTemplateContextGuards: false, - checkQueries: false, checkTemplateBodies: false, checkControlFlowBodies: false, // Enable deep schema checking in "basic" template type-checking mode only if Closure diff --git a/packages/compiler-cli/src/ngtsc/typecheck/test/type_check_block_spec.ts b/packages/compiler-cli/src/ngtsc/typecheck/test/type_check_block_spec.ts index 095e2a3cc48..d7a0b4d5ffe 100644 --- a/packages/compiler-cli/src/ngtsc/typecheck/test/type_check_block_spec.ts +++ b/packages/compiler-cli/src/ngtsc/typecheck/test/type_check_block_spec.ts @@ -1170,7 +1170,6 @@ describe('type check blocks', () => { ]; const BASE_CONFIG: TypeCheckingConfig = { applyTemplateContextGuards: true, - checkQueries: false, checkTemplateBodies: true, checkControlFlowBodies: true, alwaysCheckSchemaInTemplateBodies: true, diff --git a/packages/compiler-cli/src/ngtsc/typecheck/testing/index.ts b/packages/compiler-cli/src/ngtsc/typecheck/testing/index.ts index 06e41aa8150..c3f91771d5d 100644 --- a/packages/compiler-cli/src/ngtsc/typecheck/testing/index.ts +++ b/packages/compiler-cli/src/ngtsc/typecheck/testing/index.ts @@ -282,7 +282,6 @@ export function ngForTypeCheckTarget(): TypeCheckingTarget { export const ALL_ENABLED_CONFIG: Readonly = { applyTemplateContextGuards: true, - checkQueries: false, checkTemplateBodies: true, checkControlFlowBodies: true, alwaysCheckSchemaInTemplateBodies: true, @@ -442,7 +441,6 @@ export function tcb( const fullConfig: TypeCheckingConfig = { applyTemplateContextGuards: true, - checkQueries: false, checkTypeOfInputBindings: true, honorAccessModifiersForInputBindings: false, strictNullInputBindings: true, diff --git a/packages/compiler/src/typecheck/api.ts b/packages/compiler/src/typecheck/api.ts index a8a4a302e14..75668abd6c9 100644 --- a/packages/compiler/src/typecheck/api.ts +++ b/packages/compiler/src/typecheck/api.ts @@ -252,11 +252,6 @@ export interface TypeCheckingConfig { */ alwaysCheckSchemaInTemplateBodies: boolean; - /** - * Whether to check resolvable queries. - */ - checkQueries: false; - /** * Whether to check if control flow syntax will prevent a node from being projected. */