Function wrapThisFunction2

  • Call f1 with the same params as f2 before calling f2 Sample usage

    const logRender = ()=>console.log('render')
    obj.render = wrapThisFunction(logRender, obj.beforeRender)
    // now calling obj.beforeRender(), will log 'render' and then call obj.beforeRender()

    Type Parameters

    Parameters

    • f1: T
    • Optional f2: T

    Returns T

Generated using TypeDoc