angular-cn/packages/language-service
Alex Rickabaugh 0f54d6c4a5 fix(language-service): use 'any' instead of failing for inline TCBs (#41513)
In environments such as the Language Service where inline type-checking code
is not supported, the compiler would previously produce a diagnostic when a
template would require inlining to check. This happened whenever its
component class had generic parameters with bounds that could not be safely
reproduced in an external TCB. However, this created a bad user experience
for the Language Service, as its features would then not function with such
templates.

Instead, this commit changes the compiler to use the same strategy for
inline TCBs as it does for inline type constructors - falling back to `any`
for generic types when inlining isn't available. This allows the LS to
support such templates with slightly weaker type-checking semantics, which
a test verifies. There is still a case where components that aren't
exported require an inline TCB, and the compiler will still generate a
diagnostic if so.

Fixes #41395

PR Close #41513
2021-04-12 21:02:20 -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(language-service): use 'any' instead of failing for inline TCBs (#41513) 2021-04-12 21:02:20 -07:00
src fix(compiler): allow binding to autocomplete property on select and textarea elements (#40928) 2021-03-03 10:00:27 -08: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 fix(language-service): use single entry point for Ivy and View Engine (#40967) 2021-02-24 15:05:44 -08:00