Subject: bug#78121: tsx-ts-mode: wrong indentation of body with misindented args

From: Konstantin Kharlamov <[email-masked]>
Date: Mon, 28 Apr 2025 23:15:35 +0700

Given this TypeScript:

    const updatePage = (a1: string,
                        a2: number) => {
      return true;
    }

upon attempting to indent the `return true;` line it becomes indented as:

    const updatePage = (a1: string,
                        a2: number) => {
                          return true;
    }

which isn't expected.

P.S.: I'd note separately that a2 gets indented to 2 spaces, which even though goes in line with VSCode, I am not sure if it's useful. Does anybody even indent the second param to "2 spaces" when 1st param resides much further align-wise? C and C++ modes align 2-nd param to the 1st one, python-mode does too. Should perhaps tsx-ts-mode handle that similarly as well?