Closed
Description
π Search Terms
initial element of the tuple is a rest element
π Version & Regression Information
β― Playground Link
π» Code
type T1 = [...string[], number, boolean]
declare const arr: T1
const head = arr[0]
// Actual: string | number | boolean
// Expected: string | number
π Actual behavior
When the initial element of the tuple is a rest element, it is not possible to correctly infer the type of the initial element.
π Expected behavior
Infer the correct type.
Additional information about the issue
No response
Metadata
Metadata
Assignees
Labels
No labels