strong-tie/inbound-calls
0
1'use strict';2 3var bind = require('function-bind');4var $TypeError = require('es-errors/type');5 6var $call = require('./functionCall');7var $actualApply = require('./actualApply');8 9/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */10module.exports = function callBindBasic(args) {11 if (args.length < 1 || typeof args[0] !== 'function') {12 throw new $TypeError('a function is required');13 }14 return $actualApply(bind, $call, args);15};16 