Necesito una función que tenga la misma funcionalidad que Function.prototype.bind(). Tengo:
export function customBind(func, context, ...args) { const bindArgs = [].slice.call(arguments, 2); return function() { const funcArgs = [].slice.call(arguments); return func.apply(context, bindArgs.concat(funcArgs), ...args); }; }Y error:
error Use the rest parameters instead of 'arguments' prefer-rest-params¿Cómo puedo cambiar los argumentos en algo más? Acabo de intentar con args pero eso no es correcto.