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

fluent api style method chain formatting problem #5830

Description

Seen in 1.8 nightly build (1.8.0-dev.20151130)

// given:
new Start()
   .then(
      true,
      false
   ).then(
      1234,
      'xyz'
   ).then(
      'abc',
      '987'
   );
// actual:
new Start()
   .then(
   true,
   false
   ).then(
   1234,
   'xyz'
   ).then(
   'abc',
   '987'
   );
// expected:
new Start()
   .then(
      true,
      false
   ).then(
      1234,
      'xyz'
   ).then(
      'abc',
      '987'
   );

Activity

  1. added this to the milestone on Dec 1, 2015
  2. magnushiie commented on Aug 13, 2017

    @magnushiie
    Contributor

    Note that as described in #14675, a trailing comma causes a different (although still incorrect indentation currently):

    someVar
      .chain(
      'arg1',
      'arg2',
    )
      .chain(
      3,
      4,
    );
  3. DanielRosenwasser commented on Nov 9, 2018

    @DanielRosenwasser
    Member
  4. 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