Skip to content

No space after await in typescript parser (in some cases) #6608

@G-Rath

Description

@G-Rath

Prettier 1.18.2
Playground link

--parser typescript

Input:

await (true ?
      true : false);

Output:

await(true ? true : false);

Expected behavior:

await (true ? true : false);

This is an interesting one, as I've found in my IDE if I select just that line and format I'll get the above unexpected output, but if I format the whole file I get the expected output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:rangesIssues about formatting/ignoring/etc segments of fileslang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions