Skip to content

[TypeScript]Keep a trailing comma on tuple types#6172

Merged
duailibe merged 5 commits intoprettier:masterfrom
sosukesuzuki:fix-5846
Jun 3, 2019
Merged

[TypeScript]Keep a trailing comma on tuple types#6172
duailibe merged 5 commits intoprettier:masterfrom
sosukesuzuki:fix-5846

Conversation

@sosukesuzuki
Copy link
Copy Markdown
Contributor

Fix #5846.

TypeScript trailing comma on tuple types is allowed from microsoft/TypeScript#28919.
Keep a trailing comma on tuple types when trailing-comma option is all.

// Input
export type Foo = [
  number,
  number, // comment
];
 // Output (Before)
export type Foo = [
  number,
  number // comment
];
 // Output (After);
export type Foo = [
  number,
  number, // comment
];
  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to the CHANGELOG.unreleased.md file following the template.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@duailibe duailibe merged commit ed2055b into prettier:master Jun 3, 2019
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Sep 1, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 1, 2019
@sosukesuzuki sosukesuzuki deleted the fix-5846 branch February 4, 2020 01:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TypeScript] Trailing commas from type exports removed

4 participants