Function getCallbackWrapper

  • This is used to automatically parse returned JSON and call another success function passing that parsed JSON.

    Type Parameters

    • T = any

    Parameters

    • fn: Function

      The callback function to wrap.

    • Optionalscope: any

      The scope for the callback function.

    • OptionalisErrorCallback: boolean

      Set to true if the function is an error callback. If true, and you do not provide a separate callback, alert will popup showing the error message.

    • OptionalresponseTransformer: ((json?: any) => T)

      Function to be invoked to transform the response object before invoking the primary callback function.

        • (json?): T
        • Parameters

          • Optionaljson: any

          Returns T

    Returns AjaxHandler