Function applyMethodCall

  • Calls an object method wrapped in an action.

    Type Parameters

    • O extends object
    • K extends string | number | symbol
    • FN

    Parameters

    • node: O

      Target object.

    • methodName: K

      Method name.

    • Rest...args: FN extends AnyFunction
          ? Parameters<FN<FN>>
          : never

    Returns FN extends AnyFunction
        ? ReturnType<FN>
        : never