The variables to validate. Each key is the name of a variable and the value is the value of the variable.
A map of variable names to their expected types. The expected type can be a primitive type name, an array type name, an allowlist of accepted values, or a nested object mapping.
Optionaloptions: { rejectUnknownKeys?: boolean }
Optional validation behaviour flags. Set
rejectUnknownKeys to false to ignore unknown variable keys and unknown
object properties instead of rejecting them.
Nothing when every supplied value matches its mapping.
An AniLinkValidationError when a variable does not match its expected type or when a variable or property key is unknown.
Validates the provided variables against the expected types.
Unknown variables and properties are rejected by default; pass
{ rejectUnknownKeys: false }to ignore them instead. An emptyvariablesobject is a valid no-op, and validation failures throw an AniLinkValidationError whosedetailsproperty lists every problem.