Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected chained "then" method indentation #6320

Closed
jpetitte opened this issue Jan 2, 2016 · 3 comments · Fixed by #28340
Closed

unexpected chained "then" method indentation #6320

jpetitte opened this issue Jan 2, 2016 · 3 comments · Fixed by #28340
Labels
Bug A bug in TypeScript Domain: Formatter The issue relates to the built-in formatter Fixed A PR has been merged for this issue Help Wanted You can do this

Comments

@jpetitte
Copy link

jpetitte commented Jan 2, 2016

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.

@jpetitte jpetitte changed the title odd indentation odd chained "then" method indentation Jan 2, 2016
@jpetitte jpetitte changed the title odd chained "then" method indentation unexpected chained "then" method indentation Jan 2, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Jan 7, 2016

//CC: @saschanaz

@mhegazy mhegazy added Bug A bug in TypeScript Help Wanted You can do this labels Jan 7, 2016
@mhegazy mhegazy added this to the Community milestone Jan 7, 2016
@mhegazy mhegazy added the Domain: Formatter The issue relates to the built-in formatter label Jan 7, 2016
@saschanaz
Copy link
Contributor

More:

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

@DanielRosenwasser
Copy link
Member

Thanks @saschanaz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Formatter The issue relates to the built-in formatter Fixed A PR has been merged for this issue Help Wanted You can do this
Projects
None yet
4 participants