-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Fixed a regression with string completions not being available directly in arguments typed using rest parameter #54588
Fixed a regression with string completions not being available directly in arguments typed using rest parameter #54588
Conversation
…ly in arguments typed using rest parameter
@@ -388,7 +388,7 @@ function getStringLiteralCompletionEntries(sourceFile: SourceFile, node: StringL | |||
// Get string literal completions from specialized signatures of the target | |||
// i.e. declare function f(a: 'A'); | |||
// f("/*completion position*/") | |||
return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(); | |||
return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(ContextFlags.None); |
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.
getStringLiteralCompletionsFromSignature
is already using the "inference blocking strategy" so it doesn't make sense (at least usually) for the fallback request~ to use it as well
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.
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.
@andrewbranch i wonder if there is a chance to cherry-pick this into 5.1 |
^ @DanielRosenwasser what do you think |
@typescript-bot cherry-pick this to release-5.1 |
Heya @DanielRosenwasser, I've started to run the task to cherry-pick this into |
Hey @DanielRosenwasser, I've opened #54635 for you. |
Component commits: 8e1f8b6 Fixed a regression with string completions not being available directly in arguments typed using rest parameter
…e-5.1 (#54635) Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
fixes #54572 (a regression from #52717 )
cc @andrewbranch