Function whenIsFunction

  • Conditional handler for when something is a Function.

    Type Parameters

    • TrueOutput

    Parameters

    • truthyHandler: Unary<GenericFunction<ReadOnlyArray<never>, unknown>, TrueOutput>

    Returns (<FalseInput, FalseOutput>(falsyHandler: Unary<FalseInput, FalseOutput>) => ((value: unknown) => TrueOutput | FalseOutput))

      • <FalseInput, FalseOutput>(falsyHandler: Unary<FalseInput, FalseOutput>): ((value: unknown) => TrueOutput | FalseOutput)
      • Type Parameters

        • FalseInput = GenericFunction<ReadOnlyArray<never>, unknown>

        • FalseOutput = TrueOutput

        Parameters

        • falsyHandler: Unary<FalseInput, FalseOutput>

        Returns ((value: unknown) => TrueOutput | FalseOutput)

          • (value: unknown): TrueOutput | FalseOutput
          • Parameters

            • value: unknown

            Returns TrueOutput | FalseOutput