Documentation for Simbo's Packages
    Preparing search index...

    Function createFunctionSchema

    • Creates a Zod schema for a custom function with defined interface.

      The function itself is not validated beyond being a function. But the interface for the function is fully passed through the dynamic zod types.

      Type Parameters

      Parameters

      • errorMessage: string = 'Expected a function'

        The error message to display when the validation fails.

      Returns ZodType<F, F>

      A Zod schema for the function.