Skip to content

[TypeScript] format TSAsExpression with same logic as BinaryExpression#7869

Merged
sosukesuzuki merged 17 commits intoprettier:masterfrom
sosukesuzuki:tsasexp
Mar 31, 2020
Merged

[TypeScript] format TSAsExpression with same logic as BinaryExpression#7869
sosukesuzuki merged 17 commits intoprettier:masterfrom
sosukesuzuki:tsasexp

Conversation

@sosukesuzuki
Copy link
Copy Markdown
Contributor

@sosukesuzuki sosukesuzuki commented Mar 25, 2020

Fixes #6443
This is an alternative solution to #6450.
This doesn't convert TSAsExpression in postprocess.js, but pseudo-convert it in the case.
What do you think about this approach?

  • I’ve added tests to confirm my change works.
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

Comment thread tests/typescript_argument_expansion/__snapshots__/jsfmt.spec.js.snap Outdated
Comment thread src/language-js/printer-estree.js Outdated
Comment thread src/language-js/printer-estree.js Outdated
Comment thread src/language-js/printer-estree.js Outdated
Comment thread src/common/util.js Outdated
@sosukesuzuki sosukesuzuki requested a review from thorn0 March 26, 2020 19:45
Comment thread src/common/util.js Outdated
Comment thread src/language-js/printer-estree.js Outdated
@prettier prettier deleted a comment from netlify Bot Mar 28, 2020
Copy link
Copy Markdown
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

@sosukesuzuki sosukesuzuki merged commit 8a48ca2 into prettier:master Mar 31, 2020
@sosukesuzuki sosukesuzuki deleted the tsasexp branch March 31, 2020 11:25
thorn0 added a commit that referenced this pull request Apr 6, 2020
thorn0 added a commit that referenced this pull request Apr 6, 2020
…xpression" (#7958)

* Revert "[TypeScript] format TSAsExpression with same logic as BinaryExpression (#7869)"

This reverts commit 8a48ca2.

* add tests from #7956 and #7957

* more tests
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeScript: type assertions (as) aren't wrapped

3 participants