mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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
This commit is contained in:
committed by
Jessica Janiuk
parent
53c99bb63e
commit
c55ce75b14
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user