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
The text was updated successfully, but these errors were encountered:
falsandtru
changed the title
Mapped types on arrays and tuples don't work with conditional types
Conditional types break mapped types on arrays and tuples
Feb 2, 2019
cc @sandersn
TypeScript Version: 3.4.0-dev.20190131
Search Terms:
Code
Expected behavior:
a type and b type are:
But this is also wrong. Must be string[].
Actual behavior:
b type is:
Playground Link: http://www.typescriptlang.org/play/index.html#src=type%20Remap1%3CT%3E%20%3D%20%7B%20%5BP%20in%20keyof%20T%5D%3A%20Remap1%3CT%5BP%5D%3E%3B%20%7D%3B%0Atype%20Remap2%3CT%3E%20%3D%20T%20extends%20object%20%3F%20%7B%20%5BP%20in%20keyof%20T%5D%3A%20Remap2%3CT%5BP%5D%3E%3B%20%7D%20%3A%20T%3B%0A%20%20%0Atype%20a%20%3D%20Remap1%3Cstring%5B%5D%3E%3B%0Atype%20b%20%3D%20Remap2%3Cstring%5B%5D%3E%3B
Related Issues:
#29442
The text was updated successfully, but these errors were encountered: