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

Optional Object Fields Autocomplete Appending Question Mark (?) #646

Open
angelplusultra opened this issue Oct 7, 2024 · 1 comment
Open

Comments

@angelplusultra
Copy link

Bug Summary

I've encountered a bug where if you have an object with an optional field and use autocomplete to access the field, it will append a question mark ? to the end of the property name.

Steps to Reproduce Bug

  1. Create an object with an optional field:
const obj: {
name?: string
} = {}
  1. Access the field and let the LSP suggest completion and accept when name? appears in the dropdown modal
obj.name?

Video Re-Creation

Screen.Recording.2024-10-07.at.12.12.30.PM.mov
@lukehaas
Copy link
Owner

lukehaas commented Oct 8, 2024

@angelplusultra, thanks for raising this. I'll look into it. It's most likely an upstream issue.

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

No branches or pull requests

2 participants