Skip to content

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

Open
@andrewbranch

Description

@andrewbranch

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.

Metadata

Metadata

Assignees

Labels

SuggestionAn idea for TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions