Closed
Description
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;
Environment:
TypeScript 2.3.4
TypeScript Formatter 5.2.0
Metadata
Metadata
Assignees
Labels
No labels