The captures contributed by a pattern, as a single object type.
P.bind('x') contributes { x: unknown }; P.bind('x', P.number) contributes { x: number }; P.rest('xs') contributes { xs: unknown[] }. Array and object patterns contribute the merged captures of their members.
P.bind('x')
{ x: unknown }
P.bind('x', P.number)
{ x: number }
P.rest('xs')
{ xs: unknown[] }
Note the deliberate stopping point: capture types come from the pattern (e.g. the inner pattern of a bind), never from the matched value's type.
The captures contributed by a pattern, as a single object type.
P.bind('x')contributes{ x: unknown };P.bind('x', P.number)contributes{ x: number };P.rest('xs')contributes{ xs: unknown[] }. Array and object patterns contribute the merged captures of their members.Note the deliberate stopping point: capture types come from the pattern (e.g. the inner pattern of a bind), never from the matched value's type.