From a5dece30d9df8973dc01f215d60943f6d2e09728 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 11 Sep 2018 06:14:41 -0700 Subject: [PATCH] Update declarations --- src/lib/es5.d.ts | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index f5d49a79b74..8c7bed232f0 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -297,25 +297,25 @@ declare const Function: FunctionConstructor; interface CallableFunction extends Function { /** - * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. * @param thisArg The object to be used as the this object. - * @param argArray A set of arguments to be passed to the function. + * @param args An array of argument values to be passed to the function. */ apply(this: (this: T) => R, thisArg: T): R; apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; /** - * Calls a method of an object, substituting another object for the current object. - * @param thisArg The object to be used as the current object. - * @param argArray A list of arguments to be passed to the method. + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. */ call(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R; /** * For a given function, creates a bound function that has the same body as the original function. * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg An object to which the this keyword can refer inside the new function. - * @param argArray A list of arguments to be passed to the new function. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. */ bind(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; bind(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; @@ -326,25 +326,25 @@ interface CallableFunction extends Function { interface NewableFunction extends Function { /** - * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. * @param thisArg The object to be used as the this object. - * @param argArray A set of arguments to be passed to the function. + * @param args An array of argument values to be passed to the function. */ - apply(this: new () => R, thisArg: any): R; - apply(this: new (...args: A) => R, thisArg: any, args: A): R; + apply(this: new () => T, thisArg: T): void; + apply(this: new (...args: A) => T, thisArg: T, args: A): void; /** - * Calls a method of an object, substituting another object for the current object. - * @param thisArg The object to be used as the current object. - * @param argArray A list of arguments to be passed to the method. + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. */ - call(this: new (...args: A) => R, thisArg: any, ...args: A): R; + call(this: new (...args: A) => T, thisArg: T, ...args: A): void; /** * For a given function, creates a bound function that has the same body as the original function. * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg An object to which the this keyword can refer inside the new function. - * @param argArray A list of arguments to be passed to the new function. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. */ bind(this: new (...args: A) => R, thisArg: any): new (...args: A) => R; bind(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R;