Skip to content

Adding a space after the string literal in a computed property name causes an incorrect hover displayΒ #62101

@64qq

Description

@64qq

πŸ”Ž Search Terms

space in index signature

πŸ•— Version & Regression Information

This is the behavior in every version I tried, but the display is slightly different
version > 4.5.5: "\"x\" "
version <= 4.5.5: "x\""

⏯ Playground Link

https://www.typescriptlang.org/play/?ts=5.8.3#code/JYOwLgpgTgZghgYwgAgAoHtRmQbwLABQyyA2gEQAeZyAugFzIgCuAtgEbSED0XAegPyFi5AJ5l6jVhyiEAvoSA

πŸ’» Code

interface Point {
  ["x" ]: number
//^? (property) Point["\"x\" "]: number
  ["y"]: number
}

πŸ™ Actual behavior

The hover display is "\"x\" "

πŸ™‚ Expected behavior

It should be "x"

Additional information about the issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: LS: Type DisplayBugs relating to showing types in Quick Info/Tooltips, Signature Help, or Completion InfoHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions