microsoft / microsoft/TypeScript

Drop emit of last semicolon in single-line object literal types

Open
#35,042 3 comments 0 reactions 1 assignee View on GitHub

@andrewbranch is already working on this.

Since Nov 11, 2019.

Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

Tracking follow-up to #33402

When synthetic object literal type nodes are printed on a single line, they come out like

type X = { a: string; b: string; };

While working on semicolon formatting features, I briefly had the formatter remove the semicolon after b: string;. The result was well-received but I ultimately decided the logic didn’t belong in the formatter; if this was going to be the canonical formatting of single-line object type literals, they should simply come out of the emitter that way.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.