Skip to content

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

Merged
merged 13 commits into from
Jun 25, 2015

Conversation

DanielRosenwasser
Copy link
Member

Fixes #2676.

objectbindingcompletion

let parent = previousToken.parent;

switch (previousToken.kind) {
function getContainingObjectLiteralOrBindingPatternIfApplicableForCompletion(contextToken: Node): ObjectLiteralExpression | BindingPattern {
Copy link
Contributor

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..

Copy link
Member Author

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. 😄

@mhegazy
Copy link
Contributor

mhegazy commented Jun 24, 2015

thanks! Looks good..

Can you add a test for filtering when the property name is specified, eg. var { a: b, | } = .. where a should not show again in the completion list.

also a test with an array binding pattern with a nested object pattern let [{a}] = [{a: ""}];

@DanielRosenwasser
Copy link
Member Author

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?

@mhegazy
Copy link
Contributor

mhegazy commented Jun 24, 2015

i did not see any test with renamed properties.

@DanielRosenwasser
Copy link
Member Author

@mhegazy ah, sorry, I misunderstood. Yes, I'll make one testing both of those as well as one testing parameters.

@DanielRosenwasser
Copy link
Member Author

All good now?

@mhegazy
Copy link
Contributor

mhegazy commented Jun 24, 2015

👍

@mhegazy
Copy link
Contributor

mhegazy commented Jun 24, 2015

thanks!

DanielRosenwasser added a commit that referenced this pull request Jun 25, 2015
Enable completions in object binding patterns
@DanielRosenwasser DanielRosenwasser merged commit 816cfe3 into master Jun 25, 2015
@DanielRosenwasser DanielRosenwasser deleted the completionsInObjectPatterns branch June 25, 2015 02:53
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants