-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Suggest completions for newline-delimited type argument properties #62175
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
Suggest completions for newline-delimited type argument properties #62175
Conversation
🤖 AI Assistant: Task completed: PR #62175: Suggest completions for newline-delimited type argument properties URL: https://github.c... |
1 similar comment
🤖 AI Assistant: Task completed: PR #62175: Suggest completions for newline-delimited type argument properties URL: https://github.c... |
@@ -5757,6 +5757,7 @@ function tryGetTypeLiteralNode(node: Node): TypeLiteralNode | undefined { | |||
case SyntaxKind.SemicolonToken: | |||
case SyntaxKind.CommaToken: | |||
case SyntaxKind.Identifier: | |||
case SyntaxKind.StringKeyword: |
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.
It seems to me this PR focuses on StringKeyword
but what about other tokens? Like even the NumberKeyword
? And doesn't this change mean that now completions would be suggested at the same line too (like at five: string /*marker*/
)?
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.
Wow, you're right. I must've had a brain fart this morning; I think I read StringKeyword
as StringKey
and thought it referred to property names, but in retrospect that obviously doesn't make sense. I'll close this for now and reopen with a more general fix when I have a chance. Thanks for the comments.
@@ -17,7 +17,7 @@ | |||
////var foobar: Bar<{ | |||
//// two: { | |||
//// three: { | |||
//// five: string, | |||
//// five: string |
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.
You should add a new test case instead of removing the comma from the old one. The old test case is different and it's still worth testing it.
Fixes #62117.