-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Refactored node builder flags and tests #59440
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
Changes from 1 commit
7d434b7
c5ffae5
d6b7c2a
1247fcf
736ab40
5854210
3185381
2e52805
96ee387
66daac1
330c65b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
This reverts commit 7d434b7.
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -221,7 +221,7 @@ export function addNewNodeForMemberSymbol( | |
| case SyntaxKind.PropertySignature: | ||
| case SyntaxKind.PropertyDeclaration: | ||
| let flags = NodeBuilderFlags.NoTruncation; | ||
|
Member
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. This doesn't need Sort of wondering if all old users of
Contributor
Author
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. Currently is not needed to pass the test cases. Thought we might be missing some, because adding it doesn't change any of them.
Member
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. Right, our test suite is just not always exhaustive, so I suspect that there are some lurking bugs without this flag for these auto-import / codefix cases, given those seem to in other cases depend on this flag |
||
| flags |= quotePreference === QuotePreference.Single ? NodeBuilderFlags.UseSingleQuotesForStringLiteralType : NodeBuilderFlags.None; | ||
| flags |= quotePreference === QuotePreference.Single ? NodeBuilderFlags.UseSingleQuotesForStringLiteralType : 0; | ||
| let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); | ||
| if (importAdder) { | ||
| const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
This scenario seems weird to me as it depends on
NoTruncationbeing set inTypeFormatFlags. Nonetheless, this is the current behavior, so I decided to change it but let me know if you disagree and I can rollback.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 think it's a little weird, though I guess it's also true that nobody would have ever intentionally set
AllowUnresolvedNameshere because that was never a validTypeFormatFlag.Sort of leaning towards not doing this one and seeing what happens? I assume no test changes here either.
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.
They don't change. Actually, the latest commit doesn't change any of the tests. I'll rollback this line.