keyof FilteringMappedType
can't compute its constraint
#56239
Labels
Possible Improvement
The current behavior isn't wrong, but it's possible to see that it might be better in some cases
Milestone
π Search Terms
keyof index constraint filtering mapped
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?ts=5.3.0-dev.20231027#code/C4TwDgpgBAaghgGwK4QM4B4AqA+KBeKTAbQGsIQB7AM0IF0BuAKEdEigAUAnCgNwEsAJhAEBBAMbAKnfFADejKFFScxALiXBOfAHYBzJooQVdfNVCTaS2igHdtTAL5NGO4BE5U4Y6AGVgcNwBZLwALHQgAYQptKj5dLHFJTlQoCAAPN20BFK5eQWFEqVx5RR0eCjJ1EsUlFXVMQuSiACJlMWaGBSgnRgdmITEEOE5oKgsJPmilCGAkMASJKRT0zOyoACUIMSkBdFRNHV0AGnNLaztsbAAKAH0qrq8k1HuaqCIAaSgdKDJKGgbFslaPVGqgPp1FD0HABKF5QMQjAIQYJiMLaCDqK5dRTbGJxdR+JEotGRaKxeLYmrwZBodDVV6KD5fbQ-cjUQigqBwFKfABkGi0emBckpDNqZneBjFNSMJjMAKe4KlYp6KuwlOwRy60PwuHKgkcTCAA
π» Code
π Actual behavior
π Expected behavior
It should typecheck
Additional information about the issue
Almost the same thing typechecks OK if we refactor this to
[K in keyof TActors & string]
.The text was updated successfully, but these errors were encountered: