diff --git a/lib/core.js b/lib/core.js index 22f74a51b56..3dad5d2454d 100644 --- a/lib/core.js +++ b/lib/core.js @@ -35,7 +35,9 @@ declare class Object { static create(o: any, properties?: any): any; // compiler magic static defineProperties(o: any, properties: any): any; static defineProperty(o: any, p: any, attributes: any): any; - static entries(object: any): Array<[string, mixed]>; + static entries (o: { +[s: string]: T }) : Array<[string, T]>; + static entries (o: Array | $ReadOnlyArray) : Array<[string, T]>; + static entries (o: any) : Array<[string, mixed]>; static freeze(o: T): T; static getOwnPropertyDescriptor(o: any, p: any): any; static getOwnPropertyNames(o: any): Array; @@ -45,11 +47,14 @@ declare class Object { static isExtensible(o: any): boolean; static isFrozen(o: any): boolean; static isSealed(o: any): boolean; + static keys (o: { +[key: T]: any }): Array; static keys(o: any): Array; static preventExtensions(o: any): any; static seal(o: any): any; static setPrototypeOf(o: any, proto: ?Object): bool; - static values(object: any): Array; + static values (o: { +[s: string]: T }) : Array; + static values (o: Array | $ReadOnlyArray) : Array; + static values(o: any): Array; hasOwnProperty(prop: any): boolean; isPrototypeOf(o: any): boolean; propertyIsEnumerable(prop: any): boolean;