Skip to content

Wrong formatting with multiline type literals with & and | #24294

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

Closed
mhegazy opened this issue May 21, 2018 · 2 comments
Closed

Wrong formatting with multiline type literals with & and | #24294

mhegazy opened this issue May 21, 2018 · 2 comments
Labels
Bug A bug in TypeScript Domain: Formatter The issue relates to the built-in formatter Help Wanted You can do this

Comments

@mhegazy
Copy link
Contributor

mhegazy commented May 21, 2018

TypeScript Version: 2.9.0-dev.201xxxxx

Search Terms:

Code
Format the following:

type NumberOrString = {
    a: number
} & {
    b: string
};

Expected behavior:

type NumberOrString = {
    a: number
} & {
    b: string
};

Actual behavior:

type NumberOrString = {
    a: number
} & {
        b: string
    };

Playground Link:

Related Issues:

@mhegazy mhegazy added Bug A bug in TypeScript Domain: Formatter The issue relates to the built-in formatter Help Wanted You can do this labels May 21, 2018
@mhegazy mhegazy added this to the Community milestone May 21, 2018
@Kingwl
Copy link
Contributor

Kingwl commented May 22, 2018

This troubled me for a long time

@mhegazy
Copy link
Contributor Author

mhegazy commented May 22, 2018

thanks @Kingwl for the quick fix.

@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: Formatter The issue relates to the built-in formatter Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

2 participants