[@types/underscore] Add array as key for property (#34998)

* [@types/underscore] Add array as key for `property`

* [@types/underscore] Fix review issue
This commit is contained in:
Vsevolod
2019-05-15 10:38:09 -07:00
committed by Nathan Shively-Sanders
parent 0efa64a8ba
commit d5e01247c7
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -3812,14 +3812,14 @@ declare module _ {
* @param key Property of the object.
* @return Function which accept an object an returns the value of key in that object.
**/
property(key: string): (object: Object) => any;
property(key: string | string[]): (object: Object) => any;
/**
* Returns a function that will itself return the value of a object key property.
* @param key The object to get the property value from.
* @return Function which accept a key property in `object` and returns its value.
**/
propertyOf(object: Object): (key: string) => any;
propertyOf(object: Object): (key: string | string[]) => any;
/**
* Performs an optimized deep comparison between the two objects,
+1
View File
@@ -387,6 +387,7 @@ _.isObject({});
_.isObject(1);
_.property('name')(moe);
_.property(['name'])(moe);
// (() => { return _.isArguments(arguments); })(1, 2, 3);