Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upBad completions for string literal type as indexed access type object #40322
Milestone
Comments
@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 |
Has the issue been resolved? |
@denismaxim0v No, I am still on it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found while reading over #39697
Request completions inside of
""
and you'll get the names of every propery onString
. 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 atTypeScript/src/services/stringCompletions.ts
Lines 117 to 124 in d75894d