Skip to content

Folding function calls folds closing parenthesis #40242

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

Open
cherryblossom000 opened this issue Aug 25, 2020 · 0 comments
Open

Folding function calls folds closing parenthesis #40242

cherryblossom000 opened this issue Aug 25, 2020 · 0 comments
Labels
Experience Enhancement Noncontroversial enhancements Suggestion An idea for TypeScript
Milestone

Comments

@cherryblossom000
Copy link
Contributor

TypeScript Version: 4.0.1-rc, 4.0.2, 4.1.0-dev.20200825

Search Terms:
fold call function parenthesis bracket

Code

declare const f: (_: unknown) => void
f({
  a: 3
})
f(
  3
)

Expected behavior:

The function calls should fold like this:

f({ // ...
})
f( // ...
)

This was the behaviour for the first function call in 4.0.0 because of the object literal:
screenshot of folding behaviour in TS 4.0.0

Actual behavior:

The function calls fold like this, including the last line with the closing parenthesis:

f({ // ...
f( // ...

screenshot of folding behaviour in TS 4.0.1 onwards

Playground Link: I couldn't reproduce this in the playground, so I'm not sure if this is an issue with VSCode.

Related Issues: may have been caused by #39109 which fixes #38597 (it was the only relevant issue I found that was fixed for 4.0.1 and this bug doesn't occur in 4.0.0)

@RyanCavanaugh RyanCavanaugh added Experience Enhancement Noncontroversial enhancements Suggestion An idea for TypeScript labels Aug 25, 2020
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Experience Enhancement Noncontroversial enhancements Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants