Rafe
Rafe

Reputation: 5295

How do I control TypeScript formatting in Visual Studio

If I select the following code and auto-format it (Edit > Format Selection), I get this:

function f(x,
    y
    ) {
    f(123,
        456
        );
}

Note the highly offensive, mis-indented closing parentheses. What I want is this:

function f(x,
    y
) {
    f(123,
        456
    );
}

I have searched and googled and drawn a blank. Help!

Upvotes: 2

Views: 858

Answers (1)

basarat
basarat

Reputation: 276199

You cannot control that. What you can control is how you insert new lines. Here's how I would write that segment:

function f(x,
    y) {
    f(123,
        456);
}

Upvotes: 1

Related Questions