Skip to content

Format destructuring by brace format option#13111

Merged
mhegazy merged 10 commits into
microsoft:masterfrom
saschanaz:formatDestruct
Dec 22, 2016
Merged

Format destructuring by brace format option#13111
mhegazy merged 10 commits into
microsoft:masterfrom
saschanaz:formatDestruct

Conversation

@saschanaz
Copy link
Copy Markdown
Contributor

@saschanaz saschanaz commented Dec 22, 2016

Fixes #12239

Input:

var  {a,b  }    = {   a: 'sw',  b:'r'   }; 

Output:

var { a,b } = { a: 'sw', b:'r' }; 
// or
var {a,b} = {a: 'sw', b:'r'}; 

Comment thread src/harness/fourslash.ts
public setOption(name: string, value: boolean): void;
public setOption(name: string, value: any): void {
(<any>this.state.formatCodeSettings)[name] = value;
public setOption(name: keyof ts.FormatCodeSettings, value: number | string | boolean): void {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mhegazy mhegazy merged commit 7e98fc7 into microsoft:master Dec 22, 2016
@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