import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** * Assigns own enumerable properties of source objects to the destination * object. Source objects are applied from left to right. Subsequent sources * overwrite property assignments of previous sources. * * **Note:** This method mutates `object` and is loosely based on * [`Object.assign`](https://mdn.io/Object/assign). * * @category Object * @param object The destination object. * @param [sources] The source objects. * @returns Returns `object`. * @example * * function Foo() { * this.c = 3; * } * * function Bar() { * this.e = 5; * } * * Foo.prototype.d = 4; * Bar.prototype.f = 6; * * _.assign({ 'a': 1 }, new Foo, new Bar); * // => { 'a': 1, 'c': 3, 'e': 5 } */ assign(object: TObject, source: TSource): TObject & TSource; /** * @see _.assign */ assign(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2; /** * @see _.assign */ assign(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3; /** * @see _.assign */ assign(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4; /** * @see _.assign */ assign(object: TObject): TObject; /** * @see _.assign */ assign(object: any, ...otherArgs: any[]): any; } interface Object { /** * @see _.assign */ assign(source: TSource): Object; /** * @see _.assign */ assign(source1: TSource1, source2: TSource2): Object; /** * @see _.assign */ assign(source1: TSource1, source2: TSource2, source3: TSource3): Object; /** * @see _.assign */ assign(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object; /** * @see _.assign */ assign(): Object; /** * @see _.assign */ assign(...otherArgs: any[]): Object; } interface ObjectChain { /** * @see _.assign */ assign(source: TSource): ObjectChain; /** * @see _.assign */ assign(source1: TSource1, source2: TSource2): ObjectChain; /** * @see _.assign */ assign(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain; /** * @see _.assign */ assign(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain; /** * @see _.assign */ assign(): ObjectChain; /** * @see _.assign */ assign(...otherArgs: any[]): ObjectChain; } interface LoDashStatic { /** * This method is like `_.assign` except that it iterates over own and * inherited source properties. * * **Note:** This method mutates `object`. * * @alias extend * @category Object * @param object The destination object. * @param [sources] The source objects. * @returns Returns `object`. * @example * * function Foo() { * this.b = 2; * } * * function Bar() { * this.d = 4; * } * * Foo.prototype.c = 3; * Bar.prototype.e = 5; * * _.assignIn({ 'a': 1 }, new Foo, new Bar); * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 } */ assignIn(object: TObject, source: TSource): TObject & TSource; /** * @see _.assignIn */ assignIn(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2; /** * @see _.assignIn */ assignIn(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3; /** * @see _.assignIn */ assignIn(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4; /** * @see _.assignIn */ assignIn(object: TObject): TObject; /** * @see _.assignIn */ assignIn(object: any, ...otherArgs: any[]): TResult; } interface Object { /** * @see _.assignIn */ assignIn(source: TSource): Object; /** * @see _.assignIn */ assignIn(source1: TSource1, source2: TSource2): Object; /** * @see _.assignIn */ assignIn(source1: TSource1, source2: TSource2, source3: TSource3): Object; /** * @see _.assignIn */ assignIn(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object; /** * @see _.assignIn */ assignIn(): Object; /** * @see _.assignIn */ assignIn(...otherArgs: any[]): Object; } interface ObjectChain { /** * @see _.assignIn */ assignIn(source: TSource): ObjectChain; /** * @see _.assignIn */ assignIn(source1: TSource1, source2: TSource2): ObjectChain; /** * @see _.assignIn */ assignIn(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain; /** * @see _.assignIn */ assignIn(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain; /** * @see _.assignIn */ assignIn(): ObjectChain; /** * @see _.assignIn */ assignIn(...otherArgs: any[]): ObjectChain; } type AssignCustomizer = (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => any; interface LoDashStatic { /** * This method is like `_.assignIn` except that it accepts `customizer` which * is invoked to produce the assigned values. If `customizer` returns `undefined` * assignment is handled by the method instead. The `customizer` is invoked * with five arguments: (objValue, srcValue, key, object, source). * * **Note:** This method mutates `object`. * * @alias extendWith * @category Object * @param object The destination object. * @param sources The source objects. * @param [customizer] The function to customize assigned values. * @returns Returns `object`. * @example * * function customizer(objValue, srcValue) { * return _.isUndefined(objValue) ? srcValue : objValue; * } * * var defaults = _.partialRight(_.assignInWith, customizer); * * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); * // => { 'a': 1, 'b': 2 } */ assignInWith(object: TObject, source: TSource, customizer: AssignCustomizer): TObject & TSource; /** * @see _.assignInWith */ assignInWith(object: TObject, source1: TSource1, source2: TSource2, customizer: AssignCustomizer): TObject & TSource1 & TSource2; /** * @see _.assignInWith */ assignInWith(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3; /** * @see _.assignInWith */ assignInWith(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4; /** * @see _.assignInWith */ assignInWith(object: TObject): TObject; /** * @see _.assignInWith */ assignInWith(object: any, ...otherArgs: any[]): TResult; } interface Object { /** * @see _.assignInWith */ assignInWith(source: TSource, customizer: AssignCustomizer): Object; /** * @see _.assignInWith */ assignInWith(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): Object; /** * @see _.assignInWith */ assignInWith(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): Object; /** * @see _.assignInWith */ assignInWith(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): Object; /** * @see _.assignInWith */ assignInWith(): Object; /** * @see _.assignInWith */ assignInWith(...otherArgs: any[]): Object; } interface ObjectChain { /** * @see _.assignInWith */ assignInWith(source: TSource, customizer: AssignCustomizer): ObjectChain; /** * @see _.assignInWith */ assignInWith(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): ObjectChain; /** * @see _.assignInWith */ assignInWith(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): ObjectChain; /** * @see _.assignInWith */ assignInWith(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): ObjectChain; /** * @see _.assignInWith */ assignInWith(): ObjectChain; /** * @see _.assignInWith */ assignInWith(...otherArgs: any[]): ObjectChain; } interface LoDashStatic { /** * This method is like `_.assign` except that it accepts `customizer` which * is invoked to produce the assigned values. If `customizer` returns `undefined` * assignment is handled by the method instead. The `customizer` is invoked * with five arguments: (objValue, srcValue, key, object, source). * * **Note:** This method mutates `object`. * * @category Object * @param object The destination object. * @param sources The source objects. * @param [customizer] The function to customize assigned values. * @returns Returns `object`. * @example * * function customizer(objValue, srcValue) { * return _.isUndefined(objValue) ? srcValue : objValue; * } * * var defaults = _.partialRight(_.assignWith, customizer); * * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); * // => { 'a': 1, 'b': 2 } */ assignWith(object: TObject, source: TSource, customizer: AssignCustomizer): TObject & TSource; /** * @see _.assignWith */ assignWith(object: TObject, source1: TSource1, source2: TSource2, customizer: AssignCustomizer): TObject & TSource1 & TSource2; /** * @see _.assignWith */ assignWith(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3; /** * @see _.assignWith */ assignWith(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4; /** * @see _.assignWith */ assignWith(object: TObject): TObject; /** * @see _.assignWith */ assignWith(object: any, ...otherArgs: any[]): TResult; } interface Object { /** * @see _.assignWith */ assignWith(source: TSource, customizer: AssignCustomizer): Object; /** * @see _.assignWith */ assignWith(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): Object; /** * @see _.assignWith */ assignWith(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): Object; /** * @see _.assignWith */ assignWith(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): Object; /** * @see _.assignWith */ assignWith(): Object; /** * @see _.assignWith */ assignWith(...otherArgs: any[]): Object; } interface ObjectChain { /** * @see _.assignWith */ assignWith(source: TSource, customizer: AssignCustomizer): ObjectChain; /** * @see _.assignWith */ assignWith(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): ObjectChain; /** * @see _.assignWith */ assignWith(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): ObjectChain; /** * @see _.assignWith */ assignWith(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): ObjectChain; /** * @see _.assignWith */ assignWith(): ObjectChain; /** * @see _.assignWith */ assignWith(...otherArgs: any[]): ObjectChain; } interface LoDashStatic { /** * Creates an array of elements corresponding to the given keys, or indexes, of collection. Keys may be * specified as individual arguments or as arrays of keys. * * @param object The object to iterate over. * @param props The property names or indexes of elements to pick, specified individually or in arrays. * @return Returns the new array of picked elements. */ at(object: Dictionary | NumericDictionary | null | undefined, ...props: PropertyPath[]): T[]; /** * @see _.at */ at(object: T | null | undefined, ...props: Array>): Array; } interface Object { /** * @see _.at */ at(...props: Array>): Collection; } interface Collection { /** * @see _.at */ at(...props: PropertyPath[]): Collection; } interface ObjectChain { /** * @see _.at */ at(...props: Array>): CollectionChain; } interface CollectionChain { /** * @see _.at */ at(...props: PropertyPath[]): CollectionChain; } interface LoDashStatic { /** * Creates an object that inherits from the given prototype object. If a properties object is provided its own * enumerable properties are assigned to the created object. * * @param prototype The object to inherit from. * @param properties The properties to assign to the object. * @return Returns the new object. */ create(prototype: T, properties?: U): T & U; } interface Object { /** * @see _.create */ create(properties?: U): Object; } interface ObjectChain { /** * @see _.create */ create(properties?: U): ObjectChain; } interface LoDashStatic { /** * Assigns own enumerable properties of source object(s) to the destination object for all destination * properties that resolve to undefined. Once a property is set, additional values of the same property are * ignored. * * Note: This method mutates object. * * @param object The destination object. * @param sources The source objects. * @return The destination object. */ defaults(object: TObject, source: TSource): NonNullable; /** * @see _.defaults */ defaults(object: TObject, source1: TSource1, source2: TSource2): NonNullable; /** * @see _.defaults */ defaults(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): NonNullable; /** * @see _.defaults */ defaults(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): NonNullable; /** * @see _.defaults */ defaults(object: TObject): NonNullable; /** * @see _.defaults */ defaults(object: any, ...sources: any[]): any; } interface Object { /** * @see _.defaults */ defaults(source: TSource): Object>; /** * @see _.defaults */ defaults(source1: TSource1, source2: TSource2): Object>; /** * @see _.defaults */ defaults(source1: TSource1, source2: TSource2, source3: TSource3): Object>; /** * @see _.defaults */ defaults(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object>; /** * @see _.defaults */ defaults(): Object>; /** * @see _.defaults */ defaults(...sources: any[]): Object; } interface ObjectChain { /** * @see _.defaults */ defaults(source: TSource): ObjectChain>; /** * @see _.defaults */ defaults(source1: TSource1, source2: TSource2): ObjectChain>; /** * @see _.defaults */ defaults(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain>; /** * @see _.defaults */ defaults(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain>; /** * @see _.defaults */ defaults(): ObjectChain>; /** * @see _.defaults */ defaults(...sources: any[]): ObjectChain; } interface LoDashStatic { /** * This method is like _.defaults except that it recursively assigns default properties. * @param object The destination object. * @param sources The source objects. * @return Returns object. */ defaultsDeep(object: any, ...sources: any[]): any; } interface Object { /** * @see _.defaultsDeep */ defaultsDeep(...sources: any[]): Object; } interface ObjectChain { /** * @see _.defaultsDeep */ defaultsDeep(...sources: any[]): ObjectChain; } interface LoDashStatic { /** * @see _.toPairs */ entries(object?: Dictionary | NumericDictionary): Array<[string, T]>; /** * @see _.entries */ entries(object?: object): Array<[string, any]>; } interface Object { /** * @see _.entries */ entries(): Collection<[string, T[keyof T]]>; } interface LoDashImplicitWrapper { /** * @see _.entries */ entries(): Collection<[string, any]>; } interface ObjectChain { /** * @see _.entries */ entries(): CollectionChain<[string, T[keyof T]]>; } interface LoDashExplicitWrapper { /** * @see _.entries */ entries(): CollectionChain<[string, any]>; } interface LoDashStatic { /** * @see _.entriesIn */ entriesIn(object?: Dictionary | NumericDictionary): Array<[string, T]>; /** * @see _.entriesIn */ entriesIn(object?: object): Array<[string, any]>; } interface Object { /** * @see _.entriesIn */ entriesIn(): Collection<[string, T[keyof T]]>; } interface LoDashImplicitWrapper { /** * @see _.entriesIn */ entriesIn(): Collection<[string, any]>; } interface ObjectChain { /** * @see _.entriesIn */ entriesIn(): CollectionChain<[string, T[keyof T]]>; } interface LoDashExplicitWrapper { /** * @see _.entriesIn */ entriesIn(): CollectionChain<[string, any]>; } interface LoDashStatic { /** * @see _.extend */ extend(object: TObject, source: TSource): TObject & TSource; /** * @see _.extend */ extend(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2; /** * @see _.extend */ extend(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3; /** * @see _.extend */ extend(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4; /** * @see _.extend */ extend(object: TObject): TObject; /** * @see _.extend */ extend(object: any, ...otherArgs: any[]): TResult; } interface Object { /** * @see _.extend */ extend(source: TSource): Object; /** * @see _.extend */ extend(source1: TSource1, source2: TSource2): Object; /** * @see _.extend */ extend(source1: TSource1, source2: TSource2, source3: TSource3): Object; /** * @see _.extend */ extend(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object; /** * @see _.extend */ extend(): Object; /** * @see _.extend */ extend(...otherArgs: any[]): Object; } interface ObjectChain { /** * @see _.extend */ extend(source: TSource): ObjectChain; /** * @see _.extend */ extend(source1: TSource1, source2: TSource2): ObjectChain; /** * @see _.extend */ extend(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain; /** * @see _.extend */ extend(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain; /** * @see _.extend */ extend(): ObjectChain; /** * @see _.extend */ extend(...otherArgs: any[]): ObjectChain; } interface LoDashStatic { /** * @see _.extendWith */ extendWith(object: TObject, source: TSource, customizer: AssignCustomizer): TObject & TSource; /** * @see _.extendWith */ extendWith(object: TObject, source1: TSource1, source2: TSource2, customizer: AssignCustomizer): TObject & TSource1 & TSource2; /** * @see _.extendWith */ extendWith(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3; /** * @see _.extendWith */ extendWith(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4; /** * @see _.extendWith */ extendWith(object: TObject): TObject; /** * @see _.extendWith */ extendWith(object: any, ...otherArgs: any[]): TResult; } interface Object { /** * @see _.extendWith */ extendWith(source: TSource, customizer: AssignCustomizer): Object; /** * @see _.extendWith */ extendWith(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): Object; /** * @see _.extendWith */ extendWith(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): Object; /** * @see _.extendWith */ extendWith(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): Object; /** * @see _.extendWith */ extendWith(): Object; /** * @see _.extendWith */ extendWith(...otherArgs: any[]): Object; } interface ObjectChain { /** * @see _.extendWith */ extendWith(source: TSource, customizer: AssignCustomizer): ObjectChain; /** * @see _.extendWith */ extendWith(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): ObjectChain; /** * @see _.extendWith */ extendWith(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): ObjectChain; /** * @see _.extendWith */ extendWith(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): ObjectChain; /** * @see _.extendWith */ extendWith(): ObjectChain; /** * @see _.extendWith */ extendWith(...otherArgs: any[]): ObjectChain; } interface LoDashStatic { /** * This method is like _.find except that it returns the key of the first element predicate returns truthy for * instead of the element itself. * * @param object The object to search. * @param predicate The function invoked per iteration. * @return Returns the key of the matched element, else undefined. */ findKey(object: T | null | undefined, predicate?: ObjectIteratee): string | undefined; } interface LoDashImplicitWrapper { /** * @see _.findKey */ findKey(predicate?: ObjectIteratee): string | undefined; } interface LoDashExplicitWrapper { /** * @see _.findKey */ findKey(predicate?: ObjectIteratee): StringNullableChain; } interface LoDashStatic { /** * This method is like _.findKey except that it iterates over elements of a collection in the opposite order. * * @param object The object to search. * @param predicate The function invoked per iteration. * @return Returns the key of the matched element, else undefined. */ findLastKey(object: T | null | undefined, predicate?: ObjectIteratee): string | undefined; } interface LoDashImplicitWrapper { /** * @see _.findLastKey */ findLastKey(predicate?: ObjectIteratee): string | undefined; } interface LoDashExplicitWrapper { /** * @see _.findLastKey */ findLastKey(predicate?: ObjectIteratee): StringNullableChain; } interface LoDashStatic { /** * Iterates over own and inherited enumerable properties of an object invoking iteratee for each property. The * iteratee is invoked with three arguments: (value, key, object). Iteratee functions may * exit iteration early by explicitly returning false. * * @param object The object to iterate over. * @param iteratee The function invoked per iteration. * @return Returns object. */ forIn(object: T, iteratee?: ObjectIterator): T; /** * @see _.forIn */ forIn(object: T | null | undefined, iteratee?: ObjectIterator): T | null | undefined; } interface LoDashImplicitWrapper { /** * @see _.forIn */ forIn(iteratee?: ObjectIterator): this; } interface LoDashExplicitWrapper { /** * @see _.forIn */ forIn(iteratee?: ObjectIterator): this; } interface LoDashStatic { /** * This method is like _.forIn except that it iterates over properties of object in the opposite order. * * @param object The object to iterate over. * @param iteratee The function invoked per iteration. * @return Returns object. */ forInRight(object: T, iteratee?: ObjectIterator): T; /** * @see _.forInRight */ forInRight(object: T | null | undefined, iteratee?: ObjectIterator): T | null | undefined; } interface LoDashImplicitWrapper { /** * @see _.forInRight */ forInRight(iteratee?: ObjectIterator): this; } interface LoDashExplicitWrapper { /** * @see _.forInRight */ forInRight(iteratee?: ObjectIterator): this; } interface LoDashStatic { /** * Iterates over own enumerable properties of an object invoking iteratee for each property. The iteratee is * invoked with three arguments: (value, key, object). Iteratee functions may exit * iteration early by explicitly returning false. * * @param object The object to iterate over. * @param iteratee The function invoked per iteration. * @return Returns object. */ forOwn(object: T, iteratee?: ObjectIterator): T; /** * @see _.forOwn */ forOwn(object: T | null | undefined, iteratee?: ObjectIterator): T | null | undefined; } interface LoDashImplicitWrapper { /** * @see _.forOwn */ forOwn(iteratee?: ObjectIterator): this; } interface LoDashExplicitWrapper { /** * @see _.forOwn */ forOwn(iteratee?: ObjectIterator): this; } interface LoDashStatic { /** * This method is like _.forOwn except that it iterates over properties of object in the opposite order. * * @param object The object to iterate over. * @param iteratee The function invoked per iteration. * @return Returns object. */ forOwnRight(object: T, iteratee?: ObjectIterator): T; /** * @see _.forOwnRight */ forOwnRight(object: T | null | undefined, iteratee?: ObjectIterator): T | null | undefined; } interface LoDashImplicitWrapper { /** * @see _.forOwnRight */ forOwnRight(iteratee?: ObjectIterator): this; } interface LoDashExplicitWrapper { /** * @see _.forOwnRight */ forOwnRight(iteratee?: ObjectIterator): this; } interface LoDashStatic { /** * Creates an array of function property names from own enumerable properties * of `object`. * * @category Object * @param object The object to inspect. * @returns Returns the new array of property names. * @example * * function Foo() { * this.a = _.constant('a'); * this.b = _.constant('b'); * } * * Foo.prototype.c = _.constant('c'); * * _.functions(new Foo); * // => ['a', 'b'] */ functions(object: any): string[]; } interface LoDashImplicitWrapper { /** * @see _.functions */ functions(): Collection; } interface LoDashExplicitWrapper { /** * @see _.functions */ functions(): CollectionChain; } interface LoDashStatic { /** * Creates an array of function property names from own and inherited * enumerable properties of `object`. * * @category Object * @param object The object to inspect. * @returns Returns the new array of property names. * @example * * function Foo() { * this.a = _.constant('a'); * this.b = _.constant('b'); * } * * Foo.prototype.c = _.constant('c'); * * _.functionsIn(new Foo); * // => ['a', 'b', 'c'] */ functionsIn(object: any): string[]; } interface LoDashImplicitWrapper { /** * @see _.functionsIn */ functionsIn(): Collection; } interface LoDashExplicitWrapper { /** * @see _.functionsIn */ functionsIn(): CollectionChain; } 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: TObject, path: TKey | [TKey]): TObject[TKey]; /** * @see _.get */ get(object: TObject | null | undefined, path: TKey | [TKey]): TObject[TKey] | undefined; /** * @see _.get */ get(object: TObject | null | undefined, path: TKey | [TKey], defaultValue: TDefault): Exclude | TDefault; /** * @see _.get */ get(object: TObject, path: [TKey1, TKey2]): TObject[TKey1][TKey2]; /** * @see _.get */ get(object: TObject | null | undefined, path: [TKey1, TKey2]): TObject[TKey1][TKey2] | undefined; /** * @see _.get */ get(object: TObject | null | undefined, path: [TKey1, TKey2], defaultValue: TDefault): Exclude | TDefault; /** * @see _.get */ get(object: TObject, path: [TKey1, TKey2, TKey3]): TObject[TKey1][TKey2][TKey3]; /** * @see _.get */ get(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3]): TObject[TKey1][TKey2][TKey3] | undefined; /** * @see _.get */ get(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3], defaultValue: TDefault): Exclude | TDefault; /** * @see _.get */ get(object: TObject, path: [TKey1, TKey2, TKey3, TKey4]): TObject[TKey1][TKey2][TKey3][TKey4]; /** * @see _.get */ get(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3, TKey4]): TObject[TKey1][TKey2][TKey3][TKey4] | undefined; /** * @see _.get */ get(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3, TKey4], defaultValue: TDefault): Exclude | TDefault; /** * @see _.get */ get(object: NumericDictionary, path: number): T; /** * @see _.get */ get(object: NumericDictionary | null | undefined, path: number): T | undefined; /** * @see _.get */ get(object: NumericDictionary | null | undefined, path: number, defaultValue: TDefault): T | TDefault; /** * @see _.get */ get(object: null | undefined, path: PropertyPath, defaultValue: TDefault): TDefault; /** * @see _.get */ get(object: null | undefined, path: PropertyPath): undefined; /** * @see _.get */ get(object: any, path: PropertyPath, defaultValue?: any): any; } interface String { /** * @see _.get */ get(path: number | number[]): string; /** * @see _.get */ get(path: number | number[], defaultValue: string): string; } interface Object { /** * @see _.get */ get(path: TKey | [TKey]): T[TKey]; /** * @see _.get */ get(path: TKey | [TKey], defaultValue: TDefault): Exclude | TDefault; /** * @see _.get */ get(path: [TKey1, TKey2]): T[TKey1][TKey2]; /** * @see _.get */ get(path: [TKey1, TKey2], defaultValue: TDefault): Exclude | TDefault; /** * @see _.get */ get(path: [TKey1, TKey2, TKey3]): T[TKey1][TKey2][TKey3]; /** * @see _.get */ get(path: [TKey1, TKey2, TKey3], defaultValue: TDefault): Exclude | TDefault; /** * @see _.get */ get(path: [TKey1, TKey2, TKey3, TKey4]): T[TKey1][TKey2][TKey3][TKey4]; /** * @see _.get */ get(path: [TKey1, TKey2, TKey3, TKey4], defaultValue: TDefault): Exclude | TDefault; /** * @see _.get */ get(path: PropertyPath, defaultValue?: any): any; } interface Collection { /** * @see _.get */ get(path: number): T; /** * @see _.get */ get(path: number, defaultValue: TDefault): T | TDefault; } interface StringChain { /** * @see _.get */ get(path: number | number[]): StringChain; /** * @see _.get */ get(path: number | number[], defaultValue: string): StringChain; } interface StringNullableChain { /** * @see _.get */ get(path: number | number[]): StringNullableChain; /** * @see _.get */ get(path: number | number[], defaultValue: string): StringChain; } interface ObjectChain { /** * @see _.get */ get(path: TKey | [TKey]): ExpChain; /** * @see _.get */ get(path: TKey | [TKey], defaultValue: never[]): T[TKey] extends any[] ? ExpChain> : ExpChain | never[]>; /** * @see _.get */ get(path: TKey | [TKey], defaultValue: TDefault): ExpChain | TDefault>; /** * @see _.get */ get(path: [TKey1, TKey2]): ExpChain; /** * @see _.get */ get(path: [TKey1, TKey2], defaultValue: never[]): T[TKey1][TKey2] extends any[] ? ExpChain> : ExpChain | never[]>; /** * @see _.get */ get(path: [TKey1, TKey2], defaultValue: TDefault): ExpChain | TDefault>; /** * @see _.get */ get(path: [TKey1, TKey2, TKey3]): ExpChain; /** * @see _.get */ get(path: [TKey1, TKey2, TKey3], defaultValue: never[]): T[TKey1][TKey2][TKey3] extends any[] ? ExpChain> : ExpChain | never[]>; /** * @see _.get */ get(path: [TKey1, TKey2, TKey3], defaultValue: TDefault): ExpChain | TDefault>; /** * @see _.get */ get(path: [TKey1, TKey2, TKey3, TKey4]): ExpChain; /** * @see _.get */ get(path: [TKey1, TKey2, TKey3, TKey4], defaultValue: never[]): T[TKey1][TKey2][TKey3][TKey4] extends any[] ? ExpChain> : ExpChain | never[]>; /** * @see _.get */ get(path: [TKey1, TKey2, TKey3, TKey4], defaultValue: TDefault): ExpChain | TDefault>; /** * @see _.get */ get(path: PropertyPath, defaultValue?: any): LoDashExplicitWrapper; } interface CollectionChain { /** * @see _.get */ get(path: number): ExpChain; /** * @see _.get */ get(path: number, defaultValue: TDefault): ExpChain; } interface LoDashStatic { /** * Checks if `path` is a direct property of `object`. * * @category Object * @param object The object to query. * @param path The path to check. * @returns Returns `true` if `path` exists, else `false`. * @example * * var object = { 'a': { 'b': { 'c': 3 } } }; * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); * * _.has(object, 'a'); * // => true * * _.has(object, 'a.b.c'); * // => true * * _.has(object, ['a', 'b', 'c']); * // => true * * _.has(other, 'a'); * // => false */ has(object: T, path: PropertyPath): boolean; } interface LoDashImplicitWrapper { /** * @see _.has */ has(path: PropertyPath): boolean; } interface LoDashExplicitWrapper { /** * @see _.has */ has(path: PropertyPath): PrimitiveChain; } interface LoDashStatic { /** * Checks if `path` is a direct or inherited property of `object`. * * @category Object * @param object The object to query. * @param path The path to check. * @returns Returns `true` if `path` exists, else `false`. * @example * * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); * * _.hasIn(object, 'a'); * // => true * * _.hasIn(object, 'a.b.c'); * // => true * * _.hasIn(object, ['a', 'b', 'c']); * // => true * * _.hasIn(object, 'b'); * // => false */ hasIn(object: T, path: PropertyPath): boolean; } interface LoDashImplicitWrapper { /** * @see _.hasIn */ hasIn(path: PropertyPath): boolean; } interface LoDashExplicitWrapper { /** * @see _.hasIn */ hasIn(path: PropertyPath): PrimitiveChain; } interface LoDashStatic { /** * Creates an object composed of the inverted keys and values of object. If object contains duplicate values, * subsequent values overwrite property assignments of previous values unless multiValue is true. * * @param object The object to invert. * @param multiValue Allow multiple values per key. * @return Returns the new inverted object. */ invert(object: object): Dictionary; } interface LoDashImplicitWrapper { /** * @see _.invert */ invert(): Object>; } interface LoDashExplicitWrapper { /** * @see _.invert */ invert(): ObjectChain>; } interface LoDashStatic { /** * This method is like _.invert except that the inverted object is generated from the results of running each * element of object through iteratee. The corresponding inverted value of each inverted key is an array of * keys responsible for generating the inverted value. The iteratee is invoked with one argument: (value). * * @param object The object to invert. * @param interatee The iteratee invoked per element. * @return Returns the new inverted object. */ invertBy(object: Dictionary | NumericDictionary | null | undefined, interatee?: ValueIteratee): Dictionary; /** * @see _.invertBy */ invertBy(object: T | null | undefined, interatee?: ValueIteratee): Dictionary; } interface String { /** * @see _.invertBy */ invertBy(iteratee?: ValueIteratee): Object>; } interface Collection { /** * @see _.invertBy */ invertBy(iteratee?: ValueIteratee): Object>; } interface Object { /** * @see _.invertBy */ invertBy(iteratee?: ValueIteratee): Object>; } interface StringChain { /** * @see _.invertBy */ invertBy(iteratee?: ValueIteratee): ObjectChain>; } interface StringNullableChain { /** * @see _.invertBy */ invertBy(iteratee?: ValueIteratee): ObjectChain>; } interface CollectionChain { /** * @see _.invertBy */ invertBy(iteratee?: ValueIteratee): ObjectChain>; } interface ObjectChain { /** * @see _.invertBy */ invertBy(iteratee?: ValueIteratee): ObjectChain>; } interface LoDashStatic { /** * Invokes the method at path of object. * @param object The object to query. * @param path The path of the method to invoke. * @param args The arguments to invoke the method with. */ invoke(object: any, path: PropertyPath, ...args: any[]): any; } interface LoDashImplicitWrapper { /** * @see _.invoke */ invoke(path: PropertyPath, ...args: any[]): any; } interface LoDashExplicitWrapper { /** * @see _.invoke */ invoke(path: PropertyPath, ...args: any[]): LoDashExplicitWrapper; } interface LoDashStatic { /** * Creates an array of the own enumerable property names of object. * * Note: Non-object values are coerced to objects. See the ES spec for more details. * * @param object The object to query. * @return Returns the array of property names. */ keys(object?: any): string[]; } interface LoDashImplicitWrapper { /** * @see _.keys */ keys(): Collection; } interface LoDashExplicitWrapper { /** * @see _.keys */ keys(): CollectionChain; } interface LoDashStatic { /** * Creates an array of the own and inherited enumerable property names of object. * * Note: Non-object values are coerced to objects. * * @param object The object to query. * @return An array of property names. */ keysIn(object?: any): string[]; } interface LoDashImplicitWrapper { /** * @see _.keysIn */ keysIn(): Collection; } interface LoDashExplicitWrapper { /** * @see _.keysIn */ keysIn(): CollectionChain; } interface LoDashStatic { /** * The opposite of _.mapValues; this method creates an object with the same values as object and keys generated * by running each own enumerable property of object through iteratee. * * @param object The object to iterate over. * @param iteratee The function invoked per iteration. * @return Returns the new mapped object. */ mapKeys(object: List | null | undefined, iteratee?: ListIteratee): Dictionary; /** * @see _.mapKeys */ mapKeys(object: T | null | undefined, iteratee?: ObjectIteratee): Dictionary; } interface Collection { /** * @see _.mapKeys */ mapKeys(iteratee?: ListIteratee): Object>; } interface Object { /** * @see _.mapKeys */ mapKeys(iteratee?: ObjectIteratee): Object>; } interface CollectionChain { /** * @see _.mapKeys */ mapKeys(iteratee?: ListIteratee): ObjectChain>; } interface ObjectChain { /** * @see _.mapKeys */ mapKeys(iteratee?: ObjectIteratee): ObjectChain>; } interface LoDashStatic { /** * Creates an object with the same keys as object and values generated by running each own * enumerable property of object through iteratee. The iteratee function is * invoked with three arguments: (value, key, object). * * @param object The object to iterate over. * @param iteratee The function invoked per iteration. * @return Returns the new mapped object. */ mapValues(obj: string | null | undefined, callback: StringIterator): NumericDictionary; /** * @see _.mapValues */ mapValues(obj: T | null | undefined, callback: ObjectIterator): { [P in keyof T]: TResult }; /** * @see _.mapValues */ mapValues(obj: Dictionary | NumericDictionary | null | undefined, iteratee: object): Dictionary; /** * @see _.mapValues */ mapValues(obj: T | null | undefined, iteratee: object): { [P in keyof T]: boolean }; /** * @see _.mapValues */ mapValues(obj: Dictionary | NumericDictionary | null | undefined, iteratee: TKey): Dictionary; /** * @see _.mapValues */ mapValues(obj: Dictionary | NumericDictionary | null | undefined, iteratee: string): Dictionary; /** * @see _.mapValues */ mapValues(obj: T | null | undefined, iteratee: string): { [P in keyof T]: any }; /** * @see _.mapValues */ mapValues(obj: string | null | undefined): NumericDictionary; /** * @see _.mapValues */ mapValues(obj: Dictionary | NumericDictionary | null | undefined): Dictionary; /** * @see _.mapValues */ mapValues(obj: T): T; /** * @see _.mapValues */ mapValues(obj: T | null | undefined): PartialObject; } interface String { /** * @see _.mapValues */ mapValues(callback: StringIterator): Object>; /** * @see _.mapValues */ mapValues(): Object>; } interface Collection { /** * @see _.mapValues */ mapValues(callback: DictionaryIterator): Object>; /** * @see _.mapValues */ mapValues(iteratee: TKey): Object>; /** * @see _.mapValues */ mapValues(iteratee: object): Object>; /** * @see _.mapValues */ mapValues(iteratee: string): Object>; /** * @see _.mapValues */ mapValues(): Object>; } interface Object { /** * @see _.mapValues */ mapValues(callback: ObjectIterator): Object<{ [P in keyof T]: TResult }>; /** * @see _.mapValues */ mapValues(callback: DictionaryIterator): Object>; /** * @see _.mapValues */ mapValues(iteratee: object): Object<{ [P in keyof T]: boolean }>; /** * @see _.mapValues */ mapValues(iteratee: TKey): Object>; /** * @see _.mapValues */ mapValues(iteratee: string): Object<{ [P in keyof T]: any }>; /** * @see _.mapValues */ mapValues(): Object; } interface StringChain { /** * @see _.mapValues */ mapValues(callback: StringIterator): ObjectChain>; /** * @see _.mapValues */ mapValues(): ObjectChain>; } interface StringNullableChain { /** * @see _.mapValues */ mapValues(callback: StringIterator): ObjectChain>; /** * @see _.mapValues */ mapValues(): ObjectChain>; } interface CollectionChain { /** * @see _.mapValues */ mapValues(callback: DictionaryIterator): ObjectChain>; /** * @see _.mapValues */ mapValues(iteratee: TKey): ObjectChain>; /** * @see _.mapValues */ mapValues(iteratee: object): ObjectChain>; /** * @see _.mapValues */ mapValues(iteratee: string): ObjectChain>; /** * @see _.mapValues */ mapValues(): ObjectChain>; } interface ObjectChain { /** * @see _.mapValues */ mapValues(callback: ObjectIterator): ObjectChain<{ [P in keyof T]: TResult }>; /** * @see _.mapValues */ mapValues(callback: DictionaryIterator): ObjectChain>; /** * @see _.mapValues */ mapValues(iteratee: object): ObjectChain<{ [P in keyof T]: boolean }>; /** * @see _.mapValues */ mapValues(iteratee: TKey): ObjectChain>; /** * @see _.mapValues */ mapValues(iteratee: string): ObjectChain<{ [P in keyof T]: any }>; /** * @see _.mapValues */ mapValues(): ObjectChain; } interface LoDashStatic { /** * Recursively merges own and inherited enumerable properties of source * objects into the destination object, skipping source properties that resolve * to `undefined`. Array and plain object properties are merged recursively. * Other objects and value types are overridden by assignment. Source objects * are applied from left to right. Subsequent sources overwrite property * assignments of previous sources. * * **Note:** This method mutates `object`. * * @category Object * @param object The destination object. * @param [sources] The source objects. * @returns Returns `object`. * @example * * var users = { * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] * }; * * var ages = { * 'data': [{ 'age': 36 }, { 'age': 40 }] * }; * * _.merge(users, ages); * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } */ merge(object: TObject, source: TSource): TObject & TSource; /** * @see _.merge */ merge(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2; /** * @see _.merge */ merge(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3; /** * @see _.merge */ merge(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4; /** * @see _.merge */ merge(object: any, ...otherArgs: any[]): any; } interface Object { /** * @see _.merge */ merge(source: TSource): Object; /** * @see _.merge */ merge(source1: TSource1, source2: TSource2): Object; /** * @see _.merge */ merge(source1: TSource1, source2: TSource2, source3: TSource3): Object; /** * @see _.merge */ merge(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object; /** * @see _.merge */ merge(...otherArgs: any[]): Object; } interface ObjectChain { /** * @see _.merge */ merge(source: TSource): ObjectChain; /** * @see _.merge */ merge(source1: TSource1, source2: TSource2): ObjectChain; /** * @see _.merge */ merge(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain; /** * @see _.merge */ merge(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain; /** * @see _.merge */ merge(...otherArgs: any[]): ObjectChain; } type MergeWithCustomizer = { bivariantHack(value: any, srcValue: any, key: string, object: any, source: any): any; }["bivariantHack"]; // TODO: Probably should just put all these methods on Object and forget about it. // oh, except for Collection I GUESS interface LoDashStatic { /** * This method is like `_.merge` except that it accepts `customizer` which * is invoked to produce the merged values of the destination and source * properties. If `customizer` returns `undefined` merging is handled by the * method instead. The `customizer` is invoked with seven arguments: * (objValue, srcValue, key, object, source, stack). * * @category Object * @param object The destination object. * @param sources The source objects. * @param customizer The function to customize assigned values. * @returns Returns `object`. * @example * * function customizer(objValue, srcValue) { * if (_.isArray(objValue)) { * return objValue.concat(srcValue); * } * } * * var object = { * 'fruits': ['apple'], * 'vegetables': ['beet'] * }; * * var other = { * 'fruits': ['banana'], * 'vegetables': ['carrot'] * }; * * _.mergeWith(object, other, customizer); * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } */ mergeWith(object: TObject, source: TSource, customizer: MergeWithCustomizer): TObject & TSource; /** * @see _.mergeWith */ mergeWith(object: TObject, source1: TSource1, source2: TSource2, customizer: MergeWithCustomizer): TObject & TSource1 & TSource2; /** * @see _.mergeWith */ mergeWith(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: MergeWithCustomizer): TObject & TSource1 & TSource2 & TSource3; /** * @see _.mergeWith */ mergeWith(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: MergeWithCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4; /** * @see _.mergeWith */ mergeWith(object: any, ...otherArgs: any[]): any; } interface Object { /** * @see _.mergeWith */ mergeWith(source: TSource, customizer: MergeWithCustomizer): Object; /** * @see _.mergeWith */ mergeWith(source1: TSource1, source2: TSource2, customizer: MergeWithCustomizer): Object; /** * @see _.mergeWith */ mergeWith(source1: TSource1, source2: TSource2, source3: TSource3, customizer: MergeWithCustomizer): Object; /** * @see _.mergeWith */ mergeWith(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: MergeWithCustomizer): Object; /** * @see _.mergeWith */ mergeWith(...otherArgs: any[]): Object; } interface ObjectChain { /** * @see _.mergeWith */ mergeWith(source: TSource, customizer: MergeWithCustomizer): ObjectChain; /** * @see _.mergeWith */ mergeWith(source1: TSource1, source2: TSource2, customizer: MergeWithCustomizer): ObjectChain; /** * @see _.mergeWith */ mergeWith(source1: TSource1, source2: TSource2, source3: TSource3, customizer: MergeWithCustomizer): ObjectChain; /** * @see _.mergeWith */ mergeWith(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: MergeWithCustomizer): ObjectChain; /** * @see _.mergeWith */ mergeWith(...otherArgs: any[]): ObjectChain; } interface LoDashStatic { /** * The opposite of `_.pick`; this method creates an object composed of the * own and inherited enumerable properties of `object` that are not omitted. * * @category Object * @param object The source object. * @param [paths] The property names to omit, specified * individually or in arrays.. * @returns Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.omit(object, ['a', 'c']); * // => { 'b': '2' } */ omit( object: T | null | undefined, ...paths: K ): Pick>; /** * @see _.omit */ omit(object: T | null | undefined, ...paths: Array>): Omit; /** * @see _.omit */ omit(object: T | null | undefined, ...paths: Array>): PartialObject; } interface Collection { /** * @see _.omit */ omit(...paths: Array>): Collection; } interface Object { /** * @see _.omit */ omit(...paths: Array>): Object>; /** * @see _.omit */ omit(...paths: Array>>): Object>; } interface CollectionChain { /** * @see _.omit */ omit(...paths: Array>): CollectionChain; } interface ObjectChain { /** * @see _.omit */ omit(...paths: Array>): ObjectChain>; /** * @see _.omit */ omit(...paths: Array>): ObjectChain>; } interface LoDashStatic { /** * The opposite of `_.pickBy`; this method creates an object composed of the * own and inherited enumerable properties of `object` that `predicate` * doesn't return truthy for. * * @category Object * @param object The source object. * @param [predicate=_.identity] The function invoked per property. * @returns Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.omitBy(object, _.isNumber); * // => { 'b': '2' } */ omitBy(object: Dictionary | null | undefined, predicate?: ValueKeyIteratee): Dictionary; /** * @see _.omitBy */ omitBy(object: NumericDictionary | null | undefined, predicate?: ValueKeyIteratee): NumericDictionary; /** * @see _.omitBy */ omitBy(object: T | null | undefined, predicate: ValueKeyIteratee): PartialObject; } interface Collection { /** * @see _.omitBy */ omitBy(predicate?: ValueKeyIteratee): Object>; } interface Object { /** * @see _.omitBy */ omitBy(predicate: ValueKeyIteratee): Object>; } interface CollectionChain { /** * @see _.omitBy */ omitBy(predicate?: ValueKeyIteratee): ObjectChain>; } interface ObjectChain { /** * @see _.omitBy */ omitBy(predicate: ValueKeyIteratee): ObjectChain>; } interface LoDashStatic { /** * Creates an object composed of the picked `object` properties. * * @category Object * @param object The source object. * @param [props] The property names to pick, specified * individually or in arrays. * @returns Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ pick(object: T, ...props: Array>): Pick; /** * @see _.pick */ pick(object: T | null | undefined, ...props: PropertyPath[]): PartialObject; } interface Object { /** * @see _.pick */ pick(...props: Array>): Object>; /** * @see _.pick */ pick(...props: PropertyPath[]): Object>; } interface ObjectChain { /** * @see _.pick */ pick(...props: Array>): ObjectChain>; /** * @see _.pick */ pick(...props: PropertyPath[]): ObjectChain>; } interface LoDashStatic { /** * Creates an object composed of the `object` properties `predicate` returns * truthy for. The predicate is invoked with two arguments: (value, key). * * @category Object * @param object The source object. * @param [predicate=_.identity] The function invoked per property. * @returns Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.pickBy(object, _.isNumber); * // => { 'a': 1, 'c': 3 } */ pickBy(object: Dictionary | null | undefined, predicate: ValueKeyIterateeTypeGuard): Dictionary; /** * @see _.pickBy */ pickBy(object: NumericDictionary | null | undefined, predicate: ValueKeyIterateeTypeGuard): NumericDictionary; /** * @see _.pickBy */ pickBy(object: Dictionary | null | undefined, predicate?: ValueKeyIteratee): Dictionary; /** * @see _.pickBy */ pickBy(object: NumericDictionary | null | undefined, predicate?: ValueKeyIteratee): NumericDictionary; /** * @see _.pickBy */ pickBy(object: T | null | undefined, predicate?: ValueKeyIteratee): PartialObject; } interface Collection { /** * @see _.pickBy */ pickBy(predicate: ValueKeyIterateeTypeGuard): Object>; /** * @see _.pickBy */ pickBy(predicate?: ValueKeyIteratee): Object>; } interface Object { /** * @see _.pickBy */ pickBy(predicate: ValueKeyIterateeTypeGuard): Object extends T ? NumericDictionary : Dictionary>; /** * @see _.pickBy */ pickBy(predicate?: ValueKeyIteratee): Object ? Dictionary : T extends NumericDictionary ? NumericDictionary : PartialObject>; } interface CollectionChain { /** * @see _.pickBy */ pickBy(predicate: ValueKeyIterateeTypeGuard): ObjectChain>; /** * @see _.pickBy */ pickBy(predicate?: ValueKeyIteratee): ObjectChain>; } interface ObjectChain { /** * @see _.pickBy */ pickBy(predicate: ValueKeyIterateeTypeGuard): ObjectChain extends T ? NumericDictionary : Dictionary>; /** * @see _.pickBy */ pickBy(predicate?: ValueKeyIteratee): ObjectChain ? Dictionary : T extends NumericDictionary ? NumericDictionary : PartialObject>; } interface LoDashStatic { /** * This method is like _.get except that if the resolved value is a function it’s invoked with the this binding * of its parent object and its result is returned. * * @param object The object to query. * @param path The path of the property to resolve. * @param defaultValue The value returned if the resolved value is undefined. * @return Returns the resolved value. */ result(object: any, path: PropertyPath, defaultValue?: TResult | ((...args: any[]) => TResult)): TResult; } interface LoDashImplicitWrapper { /** * @see _.result */ result(path: PropertyPath, defaultValue?: TResult | ((...args: any[]) => TResult)): TResult; } interface LoDashExplicitWrapper { /** * @see _.result */ result(path: PropertyPath, defaultValue?: TResult | ((...args: any[]) => TResult)): ExpChain; } interface LoDashStatic { /** * Sets the value at path of object. If a portion of path doesn’t exist it’s created. Arrays are created for * missing index properties while objects are created for all other missing properties. Use _.setWith to * customize path creation. * * @param object The object to modify. * @param path The path of the property to set. * @param value The value to set. * @return Returns object. */ set(object: T, path: PropertyPath, value: any): T; /** * @see _.set */ set(object: object, path: PropertyPath, value: any): TResult; } interface LoDashImplicitWrapper { /** * @see _.set */ set(path: PropertyPath, value: any): this; /** * @see _.set */ set(path: PropertyPath, value: any): ImpChain; } interface LoDashExplicitWrapper { /** * @see _.set */ set(path: PropertyPath, value: any): this; /** * @see _.set */ set(path: PropertyPath, value: any): ExpChain; } type SetWithCustomizer = (nsValue: any, key: string, nsObject: T) => any; interface LoDashStatic { /** * This method is like _.set except that it accepts customizer which is invoked to produce the objects of * path. If customizer returns undefined path creation is handled by the method instead. The customizer is * invoked with three arguments: (nsValue, key, nsObject). * * @param object The object to modify. * @param path The path of the property to set. * @param value The value to set. * @param customizer The function to customize assigned values. * @return Returns object. */ setWith(object: T, path: PropertyPath, value: any, customizer?: SetWithCustomizer): T; /** * @see _.setWith */ setWith(object: T, path: PropertyPath, value: any, customizer?: SetWithCustomizer): TResult; } interface LoDashImplicitWrapper { /** * @see _.setWith */ setWith(path: PropertyPath, value: any, customizer?: SetWithCustomizer): this; /** * @see _.setWith */ setWith(path: PropertyPath, value: any, customizer?: SetWithCustomizer): ImpChain; } interface LoDashExplicitWrapper { /** * @see _.setWith */ setWith(path: PropertyPath, value: any, customizer?: SetWithCustomizer): this; /** * @see _.setWith */ setWith(path: PropertyPath, value: any, customizer?: SetWithCustomizer): ExpChain; } interface LoDashStatic { /** * Creates an array of own enumerable key-value pairs for object. * * @param object The object to query. * @return Returns the new array of key-value pairs. */ toPairs(object?: Dictionary | NumericDictionary): Array<[string, T]>; /** * @see _.toPairs */ toPairs(object?: object): Array<[string, any]>; } interface LoDashImplicitWrapper { /** * @see _.toPairs */ toPairs(): Collection<[string, TValue extends Dictionary ? U : TValue extends NumericDictionary ? V : any]>; } interface LoDashExplicitWrapper { /** * @see _.toPairs */ toPairs(): CollectionChain<[string, TValue extends Dictionary ? U : TValue extends NumericDictionary ? V : any]>; } interface LoDashStatic { /** * Creates an array of own and inherited enumerable key-value pairs for object. * * @param object The object to query. * @return Returns the new array of key-value pairs. */ toPairsIn(object?: Dictionary | NumericDictionary): Array<[string, T]>; /** * @see _.toPairsIn */ toPairsIn(object?: object): Array<[string, any]>; } interface LoDashImplicitWrapper { /** * @see _.toPairsIn */ toPairsIn(): Collection<[string, TValue extends Dictionary ? U : TValue extends NumericDictionary ? V : any]>; } interface LoDashExplicitWrapper { /** * @see _.toPairsIn */ toPairsIn(): CollectionChain<[string, TValue extends Dictionary ? U : TValue extends NumericDictionary ? V : any]>; } interface LoDashStatic { /** * An alternative to _.reduce; this method transforms object to a new accumulator object which is the result of * running each of its own enumerable properties through iteratee, with each invocation potentially mutating * the accumulator object. The iteratee is invoked with four arguments: (accumulator, * value, key, object). Iteratee functions may exit iteration early by explicitly returning false. * * @param object The object to iterate over. * @param iteratee The function invoked per iteration. * @param accumulator The custom accumulator value. * @return Returns the accumulated value. */ transform(object: ReadonlyArray, iteratee: MemoVoidArrayIterator, accumulator?: TResult): TResult; /** * @see _.transform */ transform(object: Dictionary, iteratee: MemoVoidDictionaryIterator, accumulator?: TResult): TResult; /** * @see _.transform */ transform(object: T, iteratee: MemoVoidDictionaryIterator, accumulator?: TResult): TResult; /** * @see _.transform */ transform(object: any[]): any[]; /** * @see _.transform */ transform(object: object): Dictionary; } interface Collection { /** * @see _.transform */ transform(iteratee: MemoVoidArrayIterator, accumulator?: TResult): ImpChain; /** * @see _.transform */ transform(): Collection; } interface Object { /** * @see _.transform */ transform(iteratee: MemoVoidDictionaryIterator, accumulator?: TResult): ImpChain; /** * @see _.transform */ transform(iteratee: MemoVoidDictionaryIterator, accumulator?: TResult): ImpChain; /** * @see _.transform */ transform(): ImpChain ? Dictionary : T>; } interface CollectionChain { /** * @see _.transform */ transform(iteratee: MemoVoidArrayIterator, accumulator?: TResult): ExpChain; /** * @see _.transform */ transform(): CollectionChain; } interface ObjectChain { /** * @see _.transform */ transform(iteratee: MemoVoidDictionaryIterator, accumulator?: TResult): ExpChain; /** * @see _.transform */ transform(iteratee: MemoVoidDictionaryIterator, accumulator?: TResult): ExpChain; /** * @see _.transform */ transform(): ExpChain ? Dictionary : T>; } interface LoDashStatic { /** * Removes the property at path of object. * * Note: This method mutates object. * * @param object The object to modify. * @param path The path of the property to unset. * @return Returns true if the property is deleted, else false. */ unset(object: any, path: PropertyPath): boolean; } interface LoDashImplicitWrapper { /** * @see _.unset */ unset(path: PropertyPath): Primitive; } interface LoDashExplicitWrapper { /** * @see _.unset */ unset(path: PropertyPath): PrimitiveChain; } interface LoDashStatic { /** * This method is like _.set except that accepts updater to produce the value to set. Use _.updateWith to * customize path creation. The updater is invoked with one argument: (value). * * @param object The object to modify. * @param path The path of the property to set. * @param updater The function to produce the updated value. * @return Returns object. */ update(object: object, path: PropertyPath, updater: (value: any) => any): any; } interface LoDashImplicitWrapper { /** * @see _.update */ update(path: PropertyPath, updater: (value: any) => any): Object; } interface LoDashExplicitWrapper { /** * @see _.update */ update(path: PropertyPath, updater: (value: any) => any): ObjectChain; } interface LoDashStatic { /** * This method is like `_.update` except that it accepts `customizer` which is * invoked to produce the objects of `path`. If `customizer` returns `undefined` * path creation is handled by the method instead. The `customizer` is invoked * with three arguments: (nsValue, key, nsObject). * * **Note:** This method mutates `object`. * * @since 4.6.0 * @category Object * @param object The object to modify. * @param path The path of the property to set. * @param updater The function to produce the updated value. * @param [customizer] The function to customize assigned values. * @returns Returns `object`. * @example * * var object = {}; * * _.updateWith(object, '[0][1]', _.constant('a'), Object); * // => { '0': { '1': 'a' } } */ updateWith(object: T, path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer): T; /** * @see _.updateWith */ updateWith(object: T, path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer): TResult; } interface Object { /** * @see _.updateWith */ updateWith(path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer): this; /** * @see _.updateWith */ updateWith(path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer): Object; } interface ObjectChain { /** * @see _.updateWith */ updateWith(path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer): this; /** * @see _.updateWith */ updateWith(path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer): ObjectChain; } interface LoDashStatic { /** * Creates an array of the own enumerable property values of object. * * @param object The object to query. * @return Returns an array of property values. */ values(object: Dictionary | NumericDictionary | List | null | undefined): T[]; /** * @see _.values */ values(object: T | null | undefined): Array; /** * @see _.values */ values(object: any): any[]; } interface String { /** * @see _.values */ values(): Collection; } interface Object { /** * @see _.values */ values(): Collection; } interface ObjectChain { /** * @see _.values */ values(): CollectionChain; } interface StringChain { /** * @see _.values */ values(): CollectionChain; } interface StringNullableChain { /** * @see _.values */ values(): CollectionChain; } interface LoDashStatic { /** * Creates an array of the own and inherited enumerable property values of object. * * @param object The object to query. * @return Returns the array of property values. */ valuesIn(object: Dictionary | NumericDictionary | List | null | undefined): T[]; /** * @see _.valuesIn */ valuesIn(object: T | null | undefined): Array; } interface String { /** * @see _.valuesIn */ valuesIn(): Collection; } interface Object { /** * @see _.valuesIn */ valuesIn(): Collection; } interface StringChain { /** * @see _.valuesIn */ valuesIn(): CollectionChain; } interface StringNullableChain { /** * @see _.valuesIn */ valuesIn(): CollectionChain; } interface ObjectChain { /** * @see _.valuesIn */ valuesIn(): CollectionChain; } }