-
Notifications
You must be signed in to change notification settings - Fork 30.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
TypeScript autocompletion unexpectedly prefers hyphens #63100
Comments
Simple repo: const a = {
x: 1,
'x-y': 2
};
a.| @jrieken Seems like a suggest sort issue. The entries that TS returns have the same sort text in this case |
Yeah, that's weird. A 100%-match should win over a prefix match... |
This is what happens:
Something similar happens with |
cc @chrisdias |
@mjbvz When having those bracket-member suggestions TypeScript could return a replace-range for all completions so that they all replace the leading dot and hence have the same ranking offset. Not sure what else to do there... |
👏 thanks @mjbvz |
Steps to Reproduce:
Try autocompletion with hyphen-containing members. Here, "type" should appear first rather than second.
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: