/** * Creates a new function with the given name, arguments, body, scope, and values. * * @param {string} name - The name of the function. * @param {string|string[]} aArgs - The argument names of the function if it's `string[]`, else it's the function body without arguments. * @param {string} body - The body of the function. * @param {string[]|Object} [scope] - The scope of the function. * @param {any[]} [values] - The values of the `scope` if the `scope` is `string[]``. * @returns {Function} - The created function. * * @example * var fn = createFunction('yourFuncName', ['arg1', 'arg2'], 'return log(arg1+arg2);', {log:console.log.bind(console)}); * */ export function createFunction(name: string, aArgs: string | string[], body: string, scope?: string[] | any, values?: any[], ...args: any[]): Function; export default createFunction;