I want to keep the array definition on the same line as the closing bracket of the previous parameter.
Example of what I want:
const ids = models.reduce(
(prev: number[], curr: Model) => {
if (this.value === curr.value) prev.push(curr.id);
return prev;
}, [] // <-- THIS
);
What happens when I save the file:
const ids = models.reduce(
(prev: number[], curr: Model) => {
if (this.value === curr.value) prev.push(curr.id);
return prev;
},
[]
);
How can I achieve this? Any help is appreciated!