fix(compiler-cli): autocomplete literal types in templates by zarend · Pull Request #41645 · angular/angular

@zarend added the target: rc

This PR is targeted for the next release-candidate

label

Apr 15, 2021

@zarend zarend added action: cleanup

The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews

area: compiler

Issues related to `ngc`, Angular's template compiler

labels

Apr 15, 2021

@zarend zarend added action: review

The PR is still awaiting reviews from at least one requested reviewer

and removed action: cleanup

The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews

labels

Apr 15, 2021

@zarend zarend added action: merge

The PR is ready for merge by the caretaker

and removed action: review

The PR is still awaiting reviews from at least one requested reviewer

labels

Apr 15, 2021

@AndrewKushnir AndrewKushnir added the action: cleanup

The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews

label

Apr 15, 2021

@zarend

…41456)

This adds string literals, number literals, `true`, `false`, `null` and
`undefined` to autocomplete results in templates.

For example, when completing an input of union type.

Component: `@Input('input') input!: 'a'|'b'|null;`
Template: `[input]="|"`

Provide `'a'`, `'b'`, and `null` as autocompletion entries.

Previously we did not include literal types because we only included
results from the component context (`ctx.`) and the template scope.

This is the second attempt at this. The first attempt is in
1d12c50 and it was reverted in 75f881e.

@AndrewKushnir AndrewKushnir changed the title Revert "Revert "fix(compiler-cli): autocomplete literal types in temp… fix(compiler-cli): autocomplete literal types in templates

Apr 15, 2021

AndrewKushnir pushed a commit that referenced this pull request

Apr 16, 2021
…41645)

This adds string literals, number literals, `true`, `false`, `null` and
`undefined` to autocomplete results in templates.

For example, when completing an input of union type.

Component: `@Input('input') input!: 'a'|'b'|null;`
Template: `[input]="|"`

Provide `'a'`, `'b'`, and `null` as autocompletion entries.

Previously we did not include literal types because we only included
results from the component context (`ctx.`) and the template scope.

This is the second attempt at this. The first attempt is in
1d12c50 and it was reverted in 75f881e.

PR Close #41645