Skip to content

Commit

Permalink
Object.keys: more precise types
Browse files Browse the repository at this point in the history
Applying the same logic used on Object.entries in the prior commit and
in microsoft#12207
  • Loading branch information
ethanresnick committed Nov 15, 2016
1 parent 4e8f5ee commit 66d9b69
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/es5.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ interface ObjectConstructor {
* Returns the names of the enumerable properties and methods of an object.
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
*/
keys<T>(o: Array<T>): string[];
keys<T extends { [key: string]: any }>(o: T): (keyof T & string)[];
keys(o: any): string[];
}

Expand Down

0 comments on commit 66d9b69

Please sign in to comment.