Skip to content

Commit d151a3c

Browse files
dgp1130atscott
authored andcommitted
refactor(language-service): enable extended template diagnostics when strict templates is forced. (#43708)
This effectively enables extended template diagnostics in the VSCode extension in google3. This uses the existing `forceStrictTemplates` option to enable since that is already a prerequisite for extended template diagnostics and we don't distinguish between them at the configuration-level in google3 anyways. PR Close #43708
1 parent 62494c9 commit d151a3c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/language-service/ivy/language_service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ function parseNgCompilerOptions(
501501
// regardless of its value in tsconfig.json.
502502
if (config.forceStrictTemplates === true) {
503503
options.strictTemplates = true;
504+
options._extendedTemplateDiagnostics = true;
504505
}
505506

506507
return options;

packages/language-service/ivy/test/legacy/language_service_spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ describe('language service adapter', () => {
8282
// is enabled.
8383
expect(ngLS.getCompilerOptions()).toEqual(jasmine.objectContaining({
8484
strictTemplates: true,
85+
_extendedTemplateDiagnostics: true,
8586
}));
8687
});
8788
});

0 commit comments

Comments
 (0)