Branches on a type guard, handing a matching value to matched and anything else to unknown. This narrows the
value type for the constraints that assume it, while keeping a dedicated branch for values that fail to qualify in
the first place.
unknown is a full validator applied to the non-matching value, free to accept it or report against it. Its default
rejects the value, naming the expected type read off the guard name when it follows the conventional isX form of
the @metreeca/core guards, for instance isString reporting {type} expected <string> value; a guard named
otherwise, an anonymous one among them, is reported against generically.
Constrains a value by type.
Branches on a type guard, handing a matching value to
matchedand anything else tounknown. This narrows the value type for the constraints that assume it, while keeping a dedicated branch for values that fail to qualify in the first place.unknownis a full validator applied to the non-matching value, free to accept it or report against it. Its default rejects the value, naming the expected type read off the guard name when it follows the conventionalisXform of the@metreeca/coreguards, for instanceisStringreporting{type} expected <string> value; a guard named otherwise, an anonymous one among them, is reported against generically.