From c55ce75b1405443a3e3338ca8fdd67279a719b44 Mon Sep 17 00:00:00 2001 From: Doug Parker Date: Fri, 1 Oct 2021 16:43:23 -0700 Subject: [PATCH] refactor(bazel): always add `strictTemplates` option to `tsconfig.json` (#43674) `strictTemplates` was only conditionally added to the `tsconfig.json` file to avoid breaking the angular/components repo (see https://github.com/angular/angular/pull/43582#issuecomment-928567758). Components has been updated in https://github.com/angular/components/pull/23677, so this condition is no longer necessary and `strictTemplates` can always be included in `tsconfig.json` without breakage. PR Close #43674 --- packages/bazel/src/ng_module/ng_module.bzl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/bazel/src/ng_module/ng_module.bzl b/packages/bazel/src/ng_module/ng_module.bzl index b268c3503a7..78883293af6 100644 --- a/packages/bazel/src/ng_module/ng_module.bzl +++ b/packages/bazel/src/ng_module/ng_module.bzl @@ -348,6 +348,7 @@ def _ngc_tsconfig(ctx, files, srcs, **kwargs): "enableSummariesForJit": is_legacy_ngc, "enableIvy": is_ivy_enabled(ctx), "fullTemplateTypeCheck": ctx.attr.type_check, + "strictTemplates": ctx.attr.strict_templates, "_extendedTemplateDiagnostics": ctx.attr.experimental_extended_template_diagnostics, "compilationMode": compilation_mode, # In Google3 we still want to use the symbol factory re-exports in order to @@ -367,12 +368,6 @@ def _ngc_tsconfig(ctx, files, srcs, **kwargs): "_useManifestPathsAsModuleName": (not _is_bazel()), } - # Only add `strictTemplates` if it is requested, that way an existing patch in components won't - # be broken by duplicating the key. - # TODO(#42966): Inline this in the above dict once components' patch is removed. - if ctx.attr.strict_templates: - angular_compiler_options["strictTemplates"] = True - if is_perf_requested(ctx): # In Ivy mode, set the `tracePerformance` Angular compiler option to enable performance # metric output.