angular-cn/packages/language-service/src
Ayaz Hafiz b608fa55f0 fix(language-service): warn, not error, on missing context members (#35036)
The language service reports an error when a directive's template
context is missing a member that is being used in a template (e.g. if
`$implicit` is being used with a template context typed as `any`).
While this diagnostic message is valuable, typing template contexts
loosely as `any` or `object` is very widespread in community packages,
and often still compiles correctly, so reporting the diagnostic as an
error may be misleading to users.

This commit changes the diagnostic to be a warning, and adds additional
information about how the user can eliminate the warning entirely -- by
refining the template context type.

Closes https://github.com/angular/vscode-ng-language-service/issues/572

PR Close #35036
2020-01-29 12:22:09 -08:00
..
common.ts fix(language-service): Do not produce diagnostics if metadata for NgModule not found (#34113) 2019-12-02 11:13:41 -08:00
completions.ts feat(language-service): completions for output $event properties in (#34570) 2020-01-28 09:07:43 -08:00
definitions.ts fix(language-service): prune duplicate returned definitions (#34995) 2020-01-29 12:21:04 -08:00
diagnostics.ts fix(language-service): Make metadata in Declaration non-optional (#34936) 2020-01-23 15:54:59 -08:00
expression_diagnostics.ts fix(language-service): warn, not error, on missing context members (#35036) 2020-01-29 12:22:09 -08:00
expression_type.ts refactor(language-service): cleanup of low-hanging TODOs (#34784) 2020-01-21 13:09:30 -05:00
expressions.ts feat(language-service): support multiple symbol definitions (#34782) 2020-01-23 10:14:19 -08:00
global_symbols.ts refactor(language-service): adds Symbol#typeArguments and does cleanup (#34571) 2020-01-13 15:16:15 -08:00
hover.ts refactor(language-service): Avoid leaking host outside of LanguageService (#34941) 2020-01-24 15:53:52 -08:00
html_info.ts refactor(language-service): use strict comparisons (#33114) 2019-10-17 21:19:02 -04:00
language_service.ts refactor(language-service): Avoid leaking host outside of LanguageService (#34941) 2020-01-24 15:53:52 -08:00
locate_symbol.ts feat(language-service): completions for output $event properties in (#34570) 2020-01-28 09:07:43 -08:00
reflector_host.ts fix(language-service): Use tsLSHost.fileExists() to resolve modules (#32642) 2019-09-12 17:18:06 -07:00
symbols.ts refactor(language-service): adds Symbol#typeArguments and does cleanup (#34571) 2020-01-13 15:16:15 -08:00
template.ts fix(language-service): CRLF offset in inline template (#34737) 2020-01-13 07:16:50 -08:00
ts_plugin.ts refactor(language-service): Consistent naming between ts and ng LanguageService (#34888) 2020-01-22 14:36:04 -05:00
types.ts fix(language-service): Make metadata in Declaration non-optional (#34936) 2020-01-23 15:54:59 -08:00
typescript_host.ts refactor(language-service): Avoid leaking host outside of LanguageService (#34941) 2020-01-24 15:53:52 -08:00
typescript_symbols.ts refactor(language-service): cleanup of low-hanging TODOs (#34784) 2020-01-21 13:09:30 -05:00
utils.ts feat(language-service): completions for output $event properties in (#34570) 2020-01-28 09:07:43 -08:00
version.ts style: remove empty comments (#23404) 2018-05-10 15:48:13 -07:00