angular-docs-cn/packages/language-service
Zach Arend fe5bf7f53f fix(compiler-cli): autocomplete literal types in templates. (#41456) (#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
1d12c50f63 and it was reverted in 75f881e078150b0d095f2c54a916fc67a10444f6.

PR Close #41645
2021-04-16 08:54:27 -07:00
..
bundles fix(language-service): use single entry point for Ivy and View Engine (#40967) 2021-02-24 15:05:44 -08:00
ivy fix(compiler-cli): autocomplete literal types in templates. (#41456) (#41645) 2021-04-16 08:54:27 -07:00
src feat(language-service): implement signature help (#41581) 2021-04-13 12:39:17 -07:00
test feat(core): support TypeScript 4.2 (#41158) 2021-03-17 09:10:25 -07:00
BUILD.bazel build(language-service): use 'export =' syntax for default export (#41165) 2021-03-11 14:48:33 -08:00
api.ts fix(language-service): Add plugin option to force strictTemplates (#41062) 2021-03-03 09:48:06 -08:00
build.sh build(language-service): install @angular/language-service in root node_modules (#40058) 2020-12-10 13:48:04 -08:00
index.ts build(language-service): use 'export =' syntax for default export (#41165) 2021-03-11 14:48:33 -08:00
package.json feat(language-service): update supported range of node versions (#41544) 2021-04-14 09:40:18 -07:00