Repository: TypeScript
Issue: Feature Request: Collapsible chained methods.
Labels: Suggestion,Awaiting More Feedback,Domain: Outlining

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker.

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ, especially the "Common Feature Requests" section: https://github.com/Microsoft/TypeScript/wiki/FAQ

-->

## Search Terms
Collapsible
Chained

## I was told to file a feature request upstream
This was originally [an issue on the vscode github.](https://github.com/microsoft/vscode/issues/103558)

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

## Suggestion
Chained methods should be collapsible, just like objects and arrays that span multiple lines.

<!-- A summary of what you'd like to see added or changed -->

## Use Cases
### Why This Is a Helpful Feature
When a lot of chained methods are written in a file, it can be really annoying because currently they aren't chainable. For example, with a library that I'm making which is heavily based on chained methods, they can take up a lot of space. In Visual Studio 2019, I _can_ collapse chained methods, but in VSCode, I can't.
### My Many Chained Methods
```
new Scene()
    .setBackgroundColor("skyBlue")
    .add(0, 5, new Rectangle(0, 250, 600, 350)
        .fill("yellow")
    )
    .add(0, 5, new Group(-600, 0)
        .fill("red")
        .add(new Rectangle(100, 100, 300, 200))
        .add(new Rectangle(400, 200, 100, 100))
        .add(wheel(400, 300))
        .add(wheel(200, 300))
        .animate(0, 5, new Animation({
            x: -600
        }, {
            x: 600
        }))
    ))
```

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->

## Examples
### Builtin Classes like `Map` and `Set`.
Expanded.
```
var m = new Map()
    .set("apple", "red")
    .set("banana", "yellow")
    .set("grapes", "purple")
```
Collapsed should be something like this.
```
> var m = new Map()...
  )
```
### Promises
Expanded
```
fsPromises.unlink("somePath")
    .then(() => {
        //Do something
    })
    .catch(err => {
        //Handle error
    })
```
Collapsed should be something like this.
```
> fsPromises.unlink("somePath")...
  )
```
<!-- Show how this would be used and what the behavior would be -->

## Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).