Extract
not narrowing type union in mapped type passed as generic
#57827
Labels
Needs Investigation
This issue needs a team member to investigate its status.
π Search Terms
Extract, type union
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?ts=5.4.2#code/C4TwDgpgBAysBOBLAdgcwNIRAZwDwBUA+KAXigFEAPBAQwGNhcBrLAewDMoBvAWACgogqAG0AClBRQWIDlHxQa2OWIC6UCNQjIAJkuwIUqKAH4oogFxRkEAG4R4KyzWQh+AXwA0UfUjSF+-HSsyPpQAEYANqysYKRQBB6EABQAXpZwvhhYeEQAlKTEvAJQQSHAUOyWPoZxKe4BfCjA9uz00Ira3PyCAI4A7hBVBmj1fPwREOU06cNZOLgd-nxAA
π» Code
π Actual behavior
z
is not assignable tostring
in thebloop
functionπ Expected behavior
z
should be assignable tostring
, because we extract string-extending keysAdditional information about the issue
This was working just fine on 5.3.3, and continues to work when the generic is concretized (hence the
let
at the bottom of the example)The text was updated successfully, but these errors were encountered: