angular-cn/packages/language-service/test/project/app
ayazhafiz 53fc2ed8bf feat(language-service): completions support for indexed types (#33775)
Previously, indexing a container type would not return completions for
the indexed type because for every TypeScript type, the recorded index
type was always marked as `undefined`, regardless of the index
signature.

This PR now returns the index type of TypeScript containers with numeric
or string index signatures. This allows use to generate completions for
arrays and defined index types:

```typescript
interface Container<T> {
  [key: string]: T;
}
const ctr: Container<T>;
ctr['stringKey']. // gives `T.` completions

const arr: T[];
arr[0]. // gives `T.` completions
```

Note that this does _not_ provide completions for properties indexed by
string literals, e.g.

```typescript
interface Container<T> {
  foo: T;
}
const ctr: Container<T>;
ctr['foo']. // does not give `T.` completions
```

Closes angular/vscode-ng-language-service#110
Closes angular/vscode-ng-language-service#277

PR Close #33775
2019-11-15 16:16:06 -08:00
..
app.component.ts fix(language-service): Turn on strict mode for test project (#32783) 2019-10-01 11:01:01 -07:00
expression-cases.ts test(language-service): Remove redundant marker methods in MockHost (#33115) 2019-10-14 16:20:55 +00:00
main.ts test(language-service): test project cleanup (#33157) 2019-10-14 23:42:53 +00:00
ng-for-cases.ts test(language-service): Remove redundant marker methods in MockHost (#33115) 2019-10-14 16:20:55 +00:00
ng-if-cases.ts test(language-service): Remove redundant marker methods in MockHost (#33115) 2019-10-14 16:20:55 +00:00
parsing-cases.ts feat(language-service): completions support for indexed types (#33775) 2019-11-15 16:16:06 -08:00
test.css test(language-service): Create proper test project (#32653) 2019-09-18 13:07:01 -07:00
test.ng test(language-service): Create proper test project (#32653) 2019-09-18 13:07:01 -07:00