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
TupleIntersection[1] and [...TupleIntersection] both seem to use an overly broad type, matching the number index signature instead of the more narrow spread signature.
What I mean is that TupleIntersection[1] behaves just like Tuple[number] does. This leads me to believe that the number index signature is synthesized correctly but the logic for numeric literals in the range of the spread signature aren't handled.
π Expected behavior
I expected Tuple's behaviour to match TupleIntersection.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered:
π Search Terms
Tuple, Intersection, Spread
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?#code/C4TwDgpgBAKgrmANtAvFA2gZ2AJwJYB2A5gDRQB0lBcAtgEYQ7oC6zA3AFCiSwLICSBYI0wQAxsDwB7AlDTwk0AGRQA3lDA4pYAFxRs+YlAC+nDl3DQFyAEoRsAQTFj7mOb0XoAjOw4B6PygggD0oanpGc24rPghBYRxRCWkCO0dnV3drOKERcUkZb18AoKhQg0IiKAAfMNoGHHMLHmyAZU0IAEMAE3d0SnJs4sDSsowK4jIB8IaWZijLDwFcxPyU9pwu3rR+ymz4vOSZYdLQgAoJqtqZxgBKFiA
π» Code
π Actual behavior
TupleIntersection[1]
and[...TupleIntersection]
both seem to use an overly broad type, matching thenumber
index signature instead of the more narrow spread signature.What I mean is that
TupleIntersection[1]
behaves just likeTuple[number]
does. This leads me to believe that thenumber
index signature is synthesized correctly but the logic for numeric literals in the range of the spread signature aren't handled.π Expected behavior
I expected
Tuple
's behaviour to matchTupleIntersection
.Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: