Recursively widens a JSON-like type into a subset view.
Walks the type tree distributing over unions and dispatching on each node:
Primitives (undefined, null, boolean, number, string): returned unchanged
Tuples and arrays: each element type is recursively widened; tuple arity, element labels, variadic segments,
and the array-versus-tuple distinction are preserved, with the readonly modifier applied
Plain objects and records (including string- and number-indexed signatures): every property becomes
readonly and optional, with values recursively widened
Recursively widens a JSON-like type into a subset view.
Walks the type tree distributing over unions and dispatching on each node:
undefined,null,boolean,number,string): returned unchangedreadonlymodifier appliedreadonlyand optional, with values recursively widened