/** Moves the this parameter out of the called function *///@ts-ignoreexportconstfbind=<Fextends(this:T,...args:any[])=>R,T,R>(fn:F):((self:T,...args:Parameters<F>)=>R)=>Function["prototype"]["call"]["bind"](fn)
(Note: the square brackets are for --mangle-props strict mode in terser)
this is a little better and acts only as a call function, but requires a reference so it's only useful on native callers like Array.prototype.push or MessagePort.prototype.postMessage, and makes it more of a take-by-reference function in rust. Modular functional programming if you will.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Here's one I use myself, which is super magical:
(Note: the square brackets are for
--mangle-props strict
mode in terser)this is a little better and acts only as a call function, but requires a reference so it's only useful on native callers like Array.prototype.push or MessagePort.prototype.postMessage, and makes it more of a take-by-reference function in rust. Modular functional programming if you will.