Skip to content

[TypeScript] Trailing commas from type exports removed #5846

@SimenB

Description

@SimenB

Prettier 1.16.4
Playground link

--parser typescript
--trailing-comma all

Input:

export type TupleType = [
  number, // exitcode
]

Output:

export type TupleType = [
  number // exitcode
];

Expected behavior:
Keep input as-is

Note that using babel, babel-flow or flow parser keeps the trailing comma

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang: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