Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(language-service): specific suggestions for template context diags #34751

Closed

Conversation

@ayazhafiz
Copy link
Member

ayazhafiz commented Jan 12, 2020

This commit elaborates diagnostics produced for invalid template
contexts by including the name of the embedded template type using the
template context, and in the common case that the implicity property is
being referenced (e.g. in a for .. of .. expression), suggesting to
refine the type of the context. This suggestion is provided because
users will sometimes use a base class as the type of the context in the
embedded view, and a more specific context later on (e.g. in an
ngOnChanges method).

Closes angular/vscode-ng-language-service#251

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Feature

Does this PR introduce a breaking change?

  • Yes
  • No
@ayazhafiz ayazhafiz requested a review from kyliau Jan 12, 2020
@ayazhafiz ayazhafiz requested a review from angular/tools-language-service as a code owner Jan 12, 2020
@ngbot ngbot bot modified the milestone: needsTriage Jan 12, 2020
@googlebot googlebot added the cla: yes label Jan 12, 2020
@ayazhafiz ayazhafiz requested a review from kyliau Jan 14, 2020
ayazhafiz added 2 commits Jan 12, 2020
This commit elaborates diagnostics produced for invalid template
contexts by including the name of the embedded template type using the
template context, and in the common case that the implicity property is
being referenced (e.g. in a `for .. of ..` expression), suggesting to
refine the type of the context. This suggestion is provided because
users will sometimes use a base class as the type of the context in the
embedded view, and a more specific context later on (e.g. in an
`ngOnChanges` method).

Closes angular/vscode-ng-language-service#251
…ext diags
@ayazhafiz ayazhafiz force-pushed the ayazhafiz:e/template-context-diag-msg branch from 8a1c4c6 to 2fb0a95 Jan 23, 2020
@kyliau
kyliau approved these changes Jan 23, 2020
AndrewKushnir added a commit that referenced this pull request Jan 23, 2020
…gs (#34751)

This commit elaborates diagnostics produced for invalid template
contexts by including the name of the embedded template type using the
template context, and in the common case that the implicity property is
being referenced (e.g. in a `for .. of ..` expression), suggesting to
refine the type of the context. This suggestion is provided because
users will sometimes use a base class as the type of the context in the
embedded view, and a more specific context later on (e.g. in an
`ngOnChanges` method).

Closes angular/vscode-ng-language-service#251

PR Close #34751
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.