fix(language-service): Remove completions for let and of in ngFor (#34434)
`let` and `of` should be considered reserved keywords in template syntax and thus should not be part of the autocomplete suggestions. For reference, TypeScript does not provide such completions. This commit removes these results and cleans up the code. PR Close #34434
This commit is contained in:

committed by
Kara Erickson

parent
357a0733c7
commit
5eaab85fc0
@ -38,7 +38,6 @@ import * as ParsingCases from './parsing-cases';
|
||||
ParsingCases.EventBinding,
|
||||
ParsingCases.FooComponent,
|
||||
ParsingCases.ForLetIEqual,
|
||||
ParsingCases.ForOfEmpty,
|
||||
ParsingCases.ForOfLetEmpty,
|
||||
ParsingCases.ForUsingComponent,
|
||||
ParsingCases.NoValueAttribute,
|
||||
|
@ -111,12 +111,6 @@ interface Person {
|
||||
street: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
template: '<div *ngFor="~{for-empty}"></div>',
|
||||
})
|
||||
export class ForOfEmpty {
|
||||
}
|
||||
|
||||
@Component({
|
||||
template: '<div *ngFor="let ~{for-let-empty}"></div>',
|
||||
})
|
||||
@ -131,7 +125,7 @@ export class ForLetIEqual {
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
<div *ngFor="~{for-let}let ~{for-person}person ~{for-of}of ~{for-people}people">
|
||||
<div *ngFor="let ~{for-person}person of ~{for-people}people">
|
||||
<span>Name: {{~{for-interp-person}person.~{for-interp-name}name}}</span>
|
||||
<span>Age: {{person.~{for-interp-age}age}}</span>
|
||||
</div>`,
|
||||
|
Reference in New Issue
Block a user