Skip to content

Compiler in LS mode should report when TTC _could_ use context guard(s), but doesn't because of flags #41042

Closed

Description

@alxhub

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.

Activity

  1. added
    area: language-service
    area: compiler
    P2
    on Mar 1, 2021
  2. self-assigned this
    on Mar 1, 2021
  3. modified the milestone: Backlog on Mar 1, 2021
  4. added a commit that references this issue on Mar 23, 2021
    18cd7a0
  5. added a commit that references this issue on Apr 5, 2021
    95272b0
  6. angular-automatic-lock-bot commented on Apr 23, 2021

    @angular-automatic-lock-bot

    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.

  7. locked and limited conversation to collaborators on Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2area: compilerarea: language-service

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions