diff --git a/types/underscore/index.d.ts b/types/underscore/index.d.ts index 504a6a52ee..d38cab453d 100644 --- a/types/underscore/index.d.ts +++ b/types/underscore/index.d.ts @@ -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, diff --git a/types/underscore/underscore-tests.ts b/types/underscore/underscore-tests.ts index 1a32063ef5..2f24c650be 100644 --- a/types/underscore/underscore-tests.ts +++ b/types/underscore/underscore-tests.ts @@ -387,6 +387,7 @@ _.isObject({}); _.isObject(1); _.property('name')(moe); +_.property(['name'])(moe); // (() => { return _.isArguments(arguments); })(1, 2, 3);