AniLink - v1.29.2
    Preparing search index...

    Function validateVariables

    • Validates the provided variables against the expected types.

      Unknown variables and properties are ignored, an empty variables object is a valid no-op, and validation failures throw an AniLinkValidationError whose details property lists every problem.

      Parameters

      • variables: object

        The variables to validate. Each key is the name of a variable and the value is the value of the variable.

      • variableTypeMappings: VariableTypeMappings

        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.

      Returns void

      An AniLinkValidationError when a variable does not match its expected type.