Skip to content
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

Not displaying completion items with empty string text labels #234588

Open
timursaurus opened this issue Nov 25, 2024 · 1 comment · May be fixed by #234589
Open

Not displaying completion items with empty string text labels #234588

timursaurus opened this issue Nov 25, 2024 · 1 comment · May be fixed by #234589
Assignees

Comments

@timursaurus
Copy link

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.95.3
  • OS Version: Darwin arm64 23.4.0

Steps to Reproduce:

  1. TypeScript Playground
class Bug {
     ' ' = 'whitespace'
     ' p' = 'padded'
     '' = 'empty'  
}

class Repl extends Bug {
     constructor() {
          super()
          // now try to access the empty string property with brackets
          this[''] // receives 3 entries from Typescript, displays only 2

     }

}

Image

Entries from extensions/typescript-language-features/src/languageFeatures/completions.ts

[
    {
        "name": "",
        "kind": "property",
        "kindModifiers": "",
        "sortText": "11",
    },
    {
        "name": " ",
        "kind": "property",
        "kindModifiers": "",
        "sortText": "11",
    },
    {
        "name": " p",
        "kind": "property",
        "kindModifiers": "",
        "sortText": "11",
    }
]
@timursaurus
Copy link
Author

timursaurus commented Nov 25, 2024

Similar PR with hidden labels: #184944

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants