Skip to content

[typescript] fix potential [object Object] in member completions#171127

Merged
mjbvz merged 2 commits intomicrosoft:mainfrom
zardoy:fix-ts-completion-object
Jan 23, 2023
Merged

[typescript] fix potential [object Object] in member completions#171127
mjbvz merged 2 commits intomicrosoft:mainfrom
zardoy:fix-ts-completion-object

Conversation

@zardoy
Copy link
Contributor

@zardoy zardoy commented Jan 12, 2023

I was experimenting in TypeScript repo to provide additional information of completion type origin (such as type name there are coming from) in label details. And the insert text of such completions were [object Object]. I wonder why label handled even in the same branch below but not there...

from vscode api perspective it would be much easier to handle such cases, if CompletionItemLabel implemented toString() method that would return the label itself.

I don't really know an easy way to test this, but its easy to test if you remove tsEntry.labelDetails if condition above.

@mjbvz mjbvz added this to the January 2023 milestone Jan 12, 2023
@mjbvz mjbvz enabled auto-merge (squash) January 12, 2023 19:23
@zardoy
Copy link
Contributor Author

zardoy commented Jan 20, 2023

I updated base branch to fix ci checks. @Tyriar I think it requires re-approval (though there is no new changes 🤔)

@mjbvz mjbvz merged commit b9ee057 into microsoft:main Jan 23, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants