You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compiler in LS mode should report when TTC _could_ use context guard(s), but doesn't because of flags #41042
P2The issue is important to a large percentage of users, with a workaroundarea: compilerIssues related to `ngc`, Angular's template compilerarea: language-serviceIssues related to Angular's VS Code language service
In the Ivy compiler, the TTC engine supports fullTemplateTypeCheck mode for backwards compatibility with View Engine codebases. To ensure this compatibility, the engine does not apply a number of type inference operations that it's capable of, including guards for structural directives. This leads to a Language Service experience in such fullTemplateTypeCheck projects where the loop variables for *ngFor directives (for example) are of type any. This was expected, and is working as intended.
However, we can improve the developer experience using the LS!
We should include an informational diagnostic on such variables or directives, informing the developer that the type information we're using is intentionally incomplete, and could be improved if the project is switched to strictTemplates mode.
Reacted by Toni Villena, Andrew Scott and Angel Muñoz
P2The issue is important to a large percentage of users, with a workaroundarea: compilerIssues related to `ngc`, Angular's template compilerarea: language-serviceIssues related to Angular's VS Code language service
Activity
fix(language-service): show suggestion when type inference is subopti…
fix(language-service): show suggestion when type inference is subopti…
angular-automatic-lock-bot commentedon Apr 23, 2021
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.