TypeScript Version: 2.4.1
Code
Provided the following code:
let a = {
b: 1,
c: 2,
d: {
e: 'a',
f: 'b',
h: 'c'
}
};
export let test = (
multi: typeof a,
line: boolean,
params: boolean
): boolean => {
let {
d: {
e,
f,
h
}
} = a;
return true;
};
After formatting, the function will be:
export let test = (
multi: typeof a,
line: boolean,
params: boolean
): boolean => {
let {
d: {
e,
f,
h
}
} = a;
return true;
};
The f and h in the destruct are unidented one position.
When I add a destruct before the d (for example c), then the formatting is correct.
let {
c, // <- one before the nested destruct.
d: {
e,
f,
h
}
} = a;
Example: https://goo.gl/9JqSRu right click -> Format Code
(original issue was posted here: vvakame/typescript-formatter#105)
TypeScript Version: 2.4.1
Code
Provided the following code:
After formatting, the function will be:
The
fandhin the destruct are unidented one position.When I add a destruct before the
d(for examplec), then the formatting is correct.Example: https://goo.gl/9JqSRu right click -> Format Code
(original issue was posted here: vvakame/typescript-formatter#105)