镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

unexpected chained "then" method indentation  #6320

Description

@jpetitte

In VS Code (as it uses the built in formatter, I assume this is the best place to put the issue), the TS formatting produces this:

foo()
  .then<void>(
  function(): void {
  },
  function(): void {
  }
  )
  .then<void>(
  function(): void {
  },
  function(): void {
  }
  );

I would expect this:

foo()
  .then<void>(
    function(): void {
    },
    function(): void {
    }
  )
  .then<void>(
    function(): void {
    },
    function(): void {
    }
  );

The former is pretty hard to read.

Activity

changed the title [-]odd indentation [/-] [+]odd chained "then" method indentation [/+] on Jan 2, 2016
changed the title [-]odd chained "then" method indentation [/-] [+]unexpected chained "then" method indentation [/+] on Jan 2, 2016

mhegazy commented on Jan 7, 2016

@mhegazy
Contributor
added this to the milestone on Jan 7, 2016

saschanaz commented on Jan 13, 2016

@saschanaz
Contributor

More:

foo.then
    <
    void // expected: 8, actual: 4
    >(
    function (): void {
    },
    function (): void {
    }
    );

DanielRosenwasser commented on Nov 9, 2018

@DanielRosenwasser
Member
locked as resolved and limited conversation to collaborators on Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterFixedA PR has been merged for this issueHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions