Skip to content

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

Closed
@mhegazy

Description

@mhegazy

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions