Function _fnOpt

  • Internal

    Use a function as the type of an option, but don't treat it as a class.

    Optionally sets the name of a function, useful for error messages.

    Type Parameters

    • const T

    Parameters

    • name: undefined | null | string
    • fn: (arg: T) => boolean

    Returns (arg: T) => boolean