You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When synthetic object literal type nodes are printed on a single line, they come out like
typeX={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.
The text was updated successfully, but these errors were encountered:
This is also how I write single-line object types. Honestly I’m a little worried that any change I make here will incite an angry mob composed of people with a particular lint rule. So I guess the answer to your question is “fear of public ridicule,” or more seriously, a preference not to shake things up for everyone without a good reason. Which is why I’m not totally confident that I will make this change at all.
Tracking follow-up to #33402
When synthetic object literal type nodes are printed on a single line, they come out like
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.The text was updated successfully, but these errors were encountered: