53fc2ed8bf
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 |
||
---|---|---|
.circleci | ||
.devcontainer | ||
.github | ||
.vscode | ||
aio | ||
docs | ||
integration | ||
modules | ||
packages | ||
scripts | ||
third_party | ||
tools | ||
.bazelignore | ||
.bazelrc | ||
.clang-format | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.nvmrc | ||
BUILD.bazel | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
WORKSPACE | ||
browser-providers.conf.js | ||
gulpfile.js | ||
karma-js.conf.js | ||
package.json | ||
protractor-perf.conf.js | ||
renovate.json | ||
shims_for_IE.js | ||
test-events.js | ||
test-main.js | ||
tslint.json | ||
yarn.lock | ||
yarn.lock.readme.md |
README.md
Angular
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages.
Quickstart
Changelog
Learn about the latest improvements.
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.