-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Enable completions in object binding patterns #3615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
let parent = previousToken.parent; | ||
|
||
switch (previousToken.kind) { | ||
function getContainingObjectLiteralOrBindingPatternIfApplicableForCompletion(contextToken: Node): ObjectLiteralExpression | BindingPattern { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make this name a little bit better.. may be getObectLikeCompletionContainer for instance..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a...way way better name. 😄
thanks! Looks good.. Can you add a test for filtering when the property name is specified, eg. also a test with an array binding pattern with a nested object pattern |
Good idea on the array binding pattern, though I think I already wrote that other test you described a few times. Can you confirm whether that's the case @mhegazy? |
i did not see any test with renamed properties. |
@mhegazy ah, sorry, I misunderstood. Yes, I'll make one testing both of those as well as one testing parameters. |
All good now? |
👍 |
thanks! |
Enable completions in object binding patterns
Fixes #2676.