You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This looks strange to me too - especially given that this worked before. As a temporary workaround you can use a Prop helper, like here.
What I've also noticed is that when indexing this BarLookup[K][/*HERE*/] we get string methods in the autocomplete as if would think that the type of BarLookup[K] is a string or something
This and #48157 are caused by the same core issue. We need to exclude mapped types with optionality modifiers and/or as clauses from the new constraint logic introduced in #47370.
Bug Report
Cannot use mapped types to create new mapped types. I have no idea why this would happen because the types are computed correctly.
🔎 Search Terms
🕗 Version & Regression Information
This changed between version 4.5.5 and 4.6.2.
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
I cannot use
name
to indexBarLookup[K]
whereK
is a keyofBarLookup
.🙂 Expected behavior
I expect type
Baz
to be{a: 'a', b:'b'}
.The text was updated successfully, but these errors were encountered: