From e44e4c0274df593da6fea68ed9a270329cd18c81 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Sat, 25 Feb 2023 22:23:10 +0000 Subject: [PATCH 1/2] Regenerate main.d.ts - fromEntries & getOwnPropertyDescriptors --- typescript/types/main.d.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/typescript/types/main.d.ts b/typescript/types/main.d.ts index 1505c6f5a..8a9273a76 100644 --- a/typescript/types/main.d.ts +++ b/typescript/types/main.d.ts @@ -8688,6 +8688,15 @@ interface ObjectConstructor { */ entries(object: any): Array<[string, any]>; + /** + * Transforms an array of key-value pairs into an object + * + * @param {any} entries - An array of `[key,value]` pairs to be used to create an object + * @returns {any} An object containing all the specified pairs + * @url http://www.espruino.com/Reference#l_Object_fromEntries + */ + fromEntries(entries: any): any; + /** * Creates a new object with the specified prototype object and properties. * properties are currently unsupported. @@ -8709,6 +8718,15 @@ interface ObjectConstructor { */ getOwnPropertyDescriptor(obj: any, name: any): any; + /** + * Get information on all properties in the object (from `Object.getOwnPropertyDescriptor`), or just `{}` if no properties + * + * @param {any} obj - The object + * @returns {any} An object containing all the property descriptors of an object + * @url http://www.espruino.com/Reference#l_Object_getOwnPropertyDescriptors + */ + getOwnPropertyDescriptors(obj: any): any; + /** * Add a new property to the Object. 'Desc' is an object with the following fields: * * `configurable` (bool = false) - can this property be changed/deleted (not From 9f4e4bc98137ca81e3b76ede8a84e555ad6c9db3 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Sat, 25 Feb 2023 23:20:53 +0000 Subject: [PATCH 2/2] Regenerate object.call types --- typescript/types/main.d.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/typescript/types/main.d.ts b/typescript/types/main.d.ts index 8a9273a76..a48ce7565 100644 --- a/typescript/types/main.d.ts +++ b/typescript/types/main.d.ts @@ -8963,32 +8963,32 @@ interface Function { /** * This executes the function with the supplied 'this' argument and parameters * - * @param {any} this - The value to use as the 'this' argument when executing the function + * @param {any} thisArg - The value to use as the 'this' argument when executing the function * @param {any} params - Optional Parameters * @returns {any} The return value of executing this function * @url http://www.espruino.com/Reference#l_Function_call */ - call(this: any, ...params: any[]): any; + call(thisArg: any, ...params: any[]): any; /** * This executes the function with the supplied 'this' argument and parameters * - * @param {any} this - The value to use as the 'this' argument when executing the function + * @param {any} thisArg - The value to use as the 'this' argument when executing the function * @param {any} args - Optional Array of Arguments * @returns {any} The return value of executing this function * @url http://www.espruino.com/Reference#l_Function_apply */ - apply(this: any, args: any): any; + apply(thisArg: any, args: ArrayLike): any; /** * This executes the function with the supplied 'this' argument and parameters * - * @param {any} this - The value to use as the 'this' argument when executing the function + * @param {any} thisArg - The value to use as the 'this' argument when executing the function * @param {any} params - Optional Default parameters that are prepended to the call * @returns {any} The 'bound' function * @url http://www.espruino.com/Reference#l_Function_bind */ - bind(this: any, ...params: any[]): any; + bind(thisArg: any, ...params: any[]): any; } /**