From 57043721dbe744ddd8d400ddff26caabcc06ef94 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Thu, 17 Dec 2020 14:45:26 -0800 Subject: [PATCH] docs(language-service): Add comment about approach to quick info for two-way bindings (#40185) This commit simply adds a comment about why quick info only gets data for the `BoundAttribute` of a two-way binding. PR Close #40185 --- packages/language-service/ivy/language_service.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/language-service/ivy/language_service.ts b/packages/language-service/ivy/language_service.ts index a735833a34..d6945cc75b 100644 --- a/packages/language-service/ivy/language_service.ts +++ b/packages/language-service/ivy/language_service.ts @@ -105,6 +105,9 @@ export class LanguageService { return undefined; } + // Because we can only show 1 quick info, just use the bound attribute if the target is a two + // way binding. We may consider concatenating additional display parts from the other target + // nodes or representing the two way binding in some other manner in the future. const node = positionDetails.context.kind === TargetNodeKind.TwoWayBindingContext ? positionDetails.context.nodes[0] : positionDetails.context.node;