Skip to content

Newlines removed in emit for argument list #12816

Description

Using the latest 2.1 release, the below TypeScript

getCollection().then(
    col => console.log(col.id),
    err => console.log(err.toString())
 );

results in the below emitted JavaScript

getCollection().then(function (col) { return console.log(col.id); }, function (err) { return console.log(err.toString()); });

This makes setting breakpoints a pain in the resulting code. It would be nice if the formatting was preserved.

Activity

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 TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions