mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Allow nodeFn.apply to accept an IArguments in addition to arrays
This commit is contained in:
@@ -380,6 +380,10 @@ example = function () {
|
||||
|
||||
promise = nodefn.apply(nodeFn2, [1, '2']);
|
||||
|
||||
example = function() {
|
||||
nodefn.apply(fs.read, arguments);
|
||||
}
|
||||
|
||||
example = function () {
|
||||
var loadPasswd = nodefn.apply(fs.readFile, ['/etc/passwd']);
|
||||
|
||||
|
||||
12
when/when.d.ts
vendored
12
when/when.d.ts
vendored
@@ -316,12 +316,12 @@ declare module "when/node" {
|
||||
): when.Promise<T>;
|
||||
|
||||
|
||||
function apply<T>(fn: _.NodeFn0<T>, args: any[]): when.Promise<T>;
|
||||
function apply<T>(fn: _.NodeFn1<any, T>, args: any[]): when.Promise<T>;
|
||||
function apply<T>(fn: _.NodeFn2<any, any, T>, args: any[]): when.Promise<T>;
|
||||
function apply<T>(fn: _.NodeFn3<any, any, any, T>, args: any[]): when.Promise<T>;
|
||||
function apply<T>(fn: _.NodeFn4<any, any, any, any, T>, args: any[]): when.Promise<T>;
|
||||
function apply<T>(fn: _.NodeFn5<any, any, any, any, any, T>, args: any[]): when.Promise<T>;
|
||||
function apply<T>(fn: _.NodeFn0<T>, args: any[] | IArguments): when.Promise<T>;
|
||||
function apply<T>(fn: _.NodeFn1<any, T>, args: any[] | IArguments): when.Promise<T>;
|
||||
function apply<T>(fn: _.NodeFn2<any, any, T>, args: any[] | IArguments): when.Promise<T>;
|
||||
function apply<T>(fn: _.NodeFn3<any, any, any, T>, args: any[] | IArguments): when.Promise<T>;
|
||||
function apply<T>(fn: _.NodeFn4<any, any, any, any, T>, args: any[] | IArguments): when.Promise<T>;
|
||||
function apply<T>(fn: _.NodeFn5<any, any, any, any, any, T>, args: any[] | IArguments): when.Promise<T>;
|
||||
|
||||
|
||||
function liftAll(srcApi: any, transform?: (destApi: any, liftedFunc: Function, name: string) => any, destApi?: any): any;
|
||||
|
||||
Reference in New Issue
Block a user