Function function

  • Creates a shape of a function that has no arguments.

    Parameters

    Returns FunctionShape<ArrayShape<[], null>, null, null>

  • Creates a shape of a function with arguments parsed by corresponding shapes in the argShapes array.

    Type Parameters

    • ArgShapes extends [] | readonly [AnyShape, AnyShape]

      The array of argument shapes.

    Parameters

    Returns FunctionShape<ArrayShape<ArgShapes, null>, null, null>

  • Creates a shape of a function with arguments parsed by an array shape.

    Type Parameters

    • InputArgs extends readonly any[]

      The array of input arguments.

    • OutputArgs extends readonly any[]

      The array of input arguments.

    • ArgsShape extends Shape<InputArgs, OutputArgs>

      The shape of the array of arguments.

    Parameters

    Returns FunctionShape<ArgsShape, null, null>