Tuples constructed via array literals don't typecheck against tuple constraints #3369
Closed
Description
opened on Jun 3, 2015
type Point = [number, number]; var x = [1, 2]; var p: Point = x;
In this case p
won't typecheck because x has been inferred as number[]
instead of [number, number]
. It would be really nice if the type system could check against both types.
Activity