Found while reading over #39697
let x: ""["bar"]
Request completions inside of "" and you'll get the names of every propery on String. What's happening is that we're not checking to see if the current string literal type is the argument type (as opposed to the object type itself).
Learning how this works might be a bit involved, but the fix is easy: add fourslash tests, add a single if check at https://github.com/microsoft/TypeScript/blob/d75894d85b8fd5f83116d3c02b5ba30a62af4348/src/services/stringCompletions.ts#L117-L124
@DanielRosenwasser I would like to take this issue as my first issue. Here are the fourslash tests I have currently: fourslashTests. Am I going in the right direction? Thank you
I haven't used the array versions of marker, but if that test is currently failing on the first verify call, I think you're on the right track!
Has the issue been resolved?
Has the issue been resolved?
@denismaxim0v No, I am still on it
Thanks @Vboivin!
Most helpful comment
@DanielRosenwasser I would like to take this issue as my first issue. Here are the fourslash tests I have currently: fourslashTests. Am I going in the right direction? Thank you