defaultedaugments a struct to add coercion logic for default values, which are applied when the input is
🤖 If you add
objectstruct with a dictionary of values, those values will be mixed in one-by-one, so the input doesn't need to be
undefined, but certain properties can be
trimmedarguments a struct to ensure that any string input values are trimmed.
coerceis a struct narrowing the types of input values you want to try coercion. In the example above, the coercion functionn will only ever be called when the input is a string—booleans would ignore coercion and fail normally.
🤖 If you want to run coercion for any type of input, use the
unknown()struct to run it in all cases.