-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserve string delimiter in type printing. #60729
base: main
Are you sure you want to change the base?
Changes from all commits
2906dea
275f6b9
638ceea
b8d575a
1f2c52c
b983d7b
78f7c22
569b7ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ | |
}, | ||
{ | ||
"text": "\"jquery\"", | ||
"kind": "stringLiteral" | ||
"kind": "moduleName" | ||
}, | ||
{ | ||
"text": "\n", | ||
|
@@ -106,7 +106,7 @@ | |
}, | ||
{ | ||
"text": "\"jquery\"", | ||
"kind": "stringLiteral" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this means that |
||
"kind": "moduleName" | ||
}, | ||
{ | ||
"text": "\n", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised to see symbol baselines change; were we inconsistent with these before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Symbol printing is involved in type printing and error printing. I applied the 'preserve source code delimiters in everything except errors' to the symbol printing too. This does mean that the delimiters are now preserved in symbol baselines where they previously were not.
Were they always replaced before? Don't think so. Some error messages used symbol printing for the property names and we can see in error baselines changes that some of those kept the
'
delimiter instead of having it replaced with"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I tried doing this in
typeWriter.ts
:And it actually still changed a whole bunch of double quotes to single quotes.... Is there some place which is not respecting the flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the latest changes, the above seems to actually work, though I don't think I actually think it matters; preserving stuff seems reasonable enough.