diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 6a48e20c16..a96b0b6f31 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -922,6 +922,8 @@ result = _.methods(_); result = <_.LoDashArrayWrapper>_(_).functions(); result = <_.LoDashArrayWrapper>_(_).methods(); +result = _.get({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); + result = _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); interface FirstSecond { diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 602b05d311..4b96e01e5e 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -5836,6 +5836,22 @@ declare module _ { methods(): _.LoDashArrayWrapper; } + //_.get + interface LoDashStatic { + /** + * Gets the property value at path of object. If the resolved + * value is undefined the defaultValue is used in its place. + * @param object The object to query. + * @param path The path of the property to get. + * @param defaultValue The value returned if the resolved value is undefined. + * @return Returns the resolved value. + **/ + get(object : Object, + path:string|string[], + defaultValue?:T + ): T; + } + //_.has interface LoDashStatic { /**