Type parameter constrained to an array is not indexable by ${number}
#56823
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
parameter constraint array index indexable number template literal
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?ts=5.4.0-dev.20231218#code/CYUwxgNghgTiAEAzArgOzAFwJYHtXwxAGcMBGAHgEF4QAPQ1YI+NAa1RwHdUBtAXQB8AClgwAXPEoBKCZR6pkAWwBGIGHwDcAKFCRYCFOmx4CxDACYqNeiEbM2Hbv2GjZMyTwAGAEgDeClTUAX09NIA
π» Code
π Actual behavior
test2
is an errorπ Expected behavior
I expect both to be roughly identical - both should not error here.
Additional information about the issue
I think that this should be OK since #48837:
The text was updated successfully, but these errors were encountered: