diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 1a4bf57d68..1d0f2fa96e 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1008,134 +1008,6 @@ module TestLastIndexOf { } } -// _.object -module TestObject { - let arrayOfKeys: string[]; - let arrayOfValues: number[]; - let arrayOfKeyValuePairs: (string|number)[][] - - let listOfKeys: _.List; - let listOfValues: _.List; - let listOfKeyValuePairs: _.List<_.List>; - - { - let result: _.Dictionary; - - result = _.object<_.Dictionary>(arrayOfKeys); - result = _.object<_.Dictionary>(listOfKeys); - } - - { - let result: _.Dictionary; - - result = _.object<_.Dictionary>(arrayOfKeys, arrayOfValues); - result = _.object<_.Dictionary>(arrayOfKeys, listOfValues); - result = _.object<_.Dictionary>(listOfKeys, listOfValues); - result = _.object<_.Dictionary>(listOfKeys, arrayOfValues); - - result = _.object>(arrayOfKeys, arrayOfValues); - result = _.object>(arrayOfKeys, listOfValues); - result = _.object>(listOfKeys, listOfValues); - result = _.object>(listOfKeys, arrayOfValues); - - result = _.object<_.Dictionary>(arrayOfKeyValuePairs); - result = _.object<_.Dictionary>(listOfKeyValuePairs); - } - - { - let result: _.Dictionary; - - result = _.object(arrayOfKeys); - result = _.object(arrayOfKeys, arrayOfValues); - result = _.object(arrayOfKeys, listOfValues); - - result = _.object(listOfKeys); - result = _.object(listOfKeys, listOfValues); - result = _.object(listOfKeys, arrayOfValues); - - result = _.object<_.Dictionary>(arrayOfKeyValuePairs); - result = _.object<_.Dictionary>(listOfKeyValuePairs); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _(arrayOfKeys).object<_.Dictionary>(); - result = _(listOfKeys).object<_.Dictionary>(); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _(arrayOfKeys).object<_.Dictionary>(arrayOfValues); - result = _(arrayOfKeys).object<_.Dictionary>(listOfValues); - result = _(listOfKeys).object<_.Dictionary>(listOfValues); - result = _(listOfKeys).object<_.Dictionary>(arrayOfValues); - - result = _(arrayOfKeys).object>(arrayOfValues); - result = _(arrayOfKeys).object>(listOfValues); - result = _(listOfKeys).object>(listOfValues); - result = _(listOfKeys).object>(arrayOfValues); - - result = _(listOfKeys).object<_.Dictionary>(arrayOfKeyValuePairs); - result = _(listOfKeys).object<_.Dictionary>(listOfKeyValuePairs); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _(arrayOfKeys).object(); - result = _(arrayOfKeys).object(arrayOfValues); - result = _(arrayOfKeys).object(listOfValues); - - result = _(listOfKeys).object(); - result = _(listOfKeys).object(listOfValues); - result = _(listOfKeys).object(arrayOfValues); - - result = _(listOfKeys).object(arrayOfKeyValuePairs); - result = _(listOfKeys).object(listOfKeyValuePairs); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _(arrayOfKeys).chain().object<_.Dictionary>(); - result = _(listOfKeys).chain().object<_.Dictionary>(); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _(arrayOfKeys).chain().object<_.Dictionary>(arrayOfValues); - result = _(arrayOfKeys).chain().object<_.Dictionary>(listOfValues); - result = _(listOfKeys).chain().object<_.Dictionary>(listOfValues); - result = _(listOfKeys).chain().object<_.Dictionary>(arrayOfValues); - - result = _(arrayOfKeys).chain().object>(arrayOfValues); - result = _(arrayOfKeys).chain().object>(listOfValues); - result = _(listOfKeys).chain().object>(listOfValues); - result = _(listOfKeys).chain().object>(arrayOfValues); - - result = _(listOfKeys).chain().object<_.Dictionary>(arrayOfKeyValuePairs); - result = _(listOfKeys).chain().object<_.Dictionary>(listOfKeyValuePairs); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _(arrayOfKeys).chain().object(); - result = _(arrayOfKeys).chain().object(arrayOfValues); - result = _(arrayOfKeys).chain().object(listOfValues); - - result = _(listOfKeys).chain().object(); - result = _(listOfKeys).chain().object(listOfValues); - result = _(listOfKeys).chain().object(arrayOfValues); - - result = _(listOfKeys).chain().object(arrayOfKeyValuePairs); - result = _(listOfKeys).chain().object(listOfKeyValuePairs); - } -} - // _.pull module TestPull { let array: TResult[]; @@ -2879,170 +2751,6 @@ module TestValueOf { * Collection * **************/ -// _.all -module TestAll { - let array: TResult[]; - let list: _.List; - let dictionary: _.Dictionary; - - let listIterator: (value: TResult, index: number, collection: _.List) => boolean; - let dictionaryIterator: (value: TResult, key: string, collection: _.Dictionary) => boolean; - - { - let result: boolean; - - result = _.all(array); - result = _.all(array, listIterator); - result = _.all(array, listIterator, any); - result = _.all(array, ''); - result = _.all<{a: number}, TResult>(array, {a: 42}); - - result = _.all(list); - result = _.all(list, listIterator); - result = _.all(list, listIterator, any); - result = _.all(list, ''); - result = _.all<{a: number}, TResult>(list, {a: 42}); - - result = _.all(dictionary); - result = _.all(dictionary, dictionaryIterator); - result = _.all(dictionary, dictionaryIterator, any); - result = _.all(dictionary, ''); - result = _.all<{a: number}, TResult>(dictionary, {a: 42}); - - result = _(array).all(); - result = _(array).all(listIterator); - result = _(array).all(listIterator, any); - result = _(array).all(''); - result = _(array).all<{a: number}>({a: 42}); - - result = _(list).all(); - result = _(list).all(listIterator); - result = _(list).all(listIterator, any); - result = _(list).all(''); - result = _(list).all<{a: number}>({a: 42}); - - result = _(dictionary).all(); - result = _(dictionary).all(dictionaryIterator); - result = _(dictionary).all(dictionaryIterator, any); - result = _(dictionary).all(''); - result = _(dictionary).all<{a: number}>({a: 42}); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().all(); - result = _(array).chain().all(listIterator); - result = _(array).chain().all(listIterator, any); - result = _(array).chain().all(''); - result = _(array).chain().all<{a: number}>({a: 42}); - - result = _(list).chain().all(); - result = _(list).chain().all(listIterator); - result = _(list).chain().all(listIterator, any); - result = _(list).chain().all(''); - result = _(list).chain().all<{a: number}>({a: 42}); - - result = _(dictionary).chain().all(); - result = _(dictionary).chain().all(dictionaryIterator); - result = _(dictionary).chain().all(dictionaryIterator, any); - result = _(dictionary).chain().all(''); - result = _(dictionary).chain().all<{a: number}>({a: 42}); - } -} - -// _.any -module TestAny { - let array: TResult[]; - let list: _.List; - let dictionary: _.Dictionary; - let numericDictionary: _.NumericDictionary; - - let listIterator: (value: TResult, index: number, collection: _.List) => boolean; - let dictionaryIterator: (value: TResult, key: string, collection: _.Dictionary) => boolean; - let numericDictionaryIterator: (value: TResult, key: number, collection: _.NumericDictionary) => boolean; - - { - let result: boolean; - - result = _.any(array); - result = _.any(array, listIterator); - result = _.any(array, listIterator, any); - result = _.any(array, ''); - result = _.any<{a: number}, TResult>(array, {a: 42}); - - result = _.any(list); - result = _.any(list, listIterator); - result = _.any(list, listIterator, any); - result = _.any(list, ''); - result = _.any<{a: number}, TResult>(list, {a: 42}); - - result = _.any(dictionary); - result = _.any(dictionary, dictionaryIterator); - result = _.any(dictionary, dictionaryIterator, any); - result = _.any(dictionary, ''); - result = _.any<{a: number}, TResult>(dictionary, {a: 42}); - - result = _.any(numericDictionary); - result = _.any(numericDictionary, numericDictionaryIterator); - result = _.any(numericDictionary, numericDictionaryIterator, any); - result = _.any(numericDictionary, ''); - result = _.any<{a: number}, TResult>(numericDictionary, {a: 42}); - - result = _(array).any(); - result = _(array).any(listIterator); - result = _(array).any(listIterator, any); - result = _(array).any(''); - result = _(array).any<{a: number}>({a: 42}); - - result = _(list).any(); - result = _(list).any(listIterator); - result = _(list).any(listIterator, any); - result = _(list).any(''); - result = _(list).any<{a: number}>({a: 42}); - - result = _(dictionary).any(); - result = _(dictionary).any(dictionaryIterator); - result = _(dictionary).any(dictionaryIterator, any); - result = _(dictionary).any(''); - result = _(dictionary).any<{a: number}>({a: 42}); - - result = _(numericDictionary).any(); - result = _(numericDictionary).any(numericDictionaryIterator); - result = _(numericDictionary).any(numericDictionaryIterator, any); - result = _(numericDictionary).any(''); - result = _(numericDictionary).any<{a: number}>({a: 42}); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().any(); - result = _(array).chain().any(listIterator); - result = _(array).chain().any(listIterator, any); - result = _(array).chain().any(''); - result = _(array).chain().any<{a: number}>({a: 42}); - - result = _(list).chain().any(); - result = _(list).chain().any(listIterator); - result = _(list).chain().any(listIterator, any); - result = _(list).chain().any(''); - result = _(list).chain().any<{a: number}>({a: 42}); - - result = _(dictionary).chain().any(); - result = _(dictionary).chain().any(dictionaryIterator); - result = _(dictionary).chain().any(dictionaryIterator, any); - result = _(dictionary).chain().any(''); - result = _(dictionary).chain().any<{a: number}>({a: 42}); - - result = _(numericDictionary).chain().any(); - result = _(numericDictionary).chain().any(numericDictionaryIterator); - result = _(numericDictionary).chain().any(numericDictionaryIterator, any); - result = _(numericDictionary).chain().any(''); - result = _(numericDictionary).chain().any<{a: number}>({a: 42}); - } -} - // _.at module TestAt { let array: TResult[]; @@ -3074,143 +2782,6 @@ module TestAt { } } -// _.collect -module TestCollect { - let array: number[]; - let list: _.List; - let dictionary: _.Dictionary; - - let listIterator: (value: number, index: number, collection: _.List) => TResult; - let dictionaryIterator: (value: number, key: string, collection: _.Dictionary) => TResult; - - { - let result: TResult[]; - - result = _.collect(array); - result = _.collect(array, listIterator); - result = _.collect(array, listIterator, any); - result = _.collect(array, ''); - - result = _.collect(list); - result = _.collect(list, listIterator); - result = _.collect(list, listIterator, any); - result = _.collect(list, ''); - - result = _.collect(dictionary); - result = _.collect(dictionary, dictionaryIterator); - result = _.collect(dictionary, dictionaryIterator, any); - result = _.collect(dictionary, ''); - } - - { - let result: boolean[]; - - result = _.collect(array, {}); - result = _.collect(list, {}); - result = _.collect(dictionary, {}); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).collect(); - result = _(array).collect(listIterator); - result = _(array).collect(listIterator, any); - result = _(array).collect(''); - - result = _(list).collect(); - result = _(list).collect(listIterator); - result = _(list).collect(listIterator, any); - result = _(list).collect(''); - - result = _(dictionary).collect(); - result = _(dictionary).collect(dictionaryIterator); - result = _(dictionary).collect(dictionaryIterator, any); - result = _(dictionary).collect(''); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).collect<{}>({}); - result = _(list).collect<{}>({}); - result = _(dictionary).collect<{}>({}); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().collect(); - result = _(array).chain().collect(listIterator); - result = _(array).chain().collect(listIterator, any); - result = _(array).chain().collect(''); - - result = _(list).chain().collect(); - result = _(list).chain().collect(listIterator); - result = _(list).chain().collect(listIterator, any); - result = _(list).chain().collect(''); - - result = _(dictionary).chain().collect(); - result = _(dictionary).chain().collect(dictionaryIterator); - result = _(dictionary).chain().collect(dictionaryIterator, any); - result = _(dictionary).chain().collect(''); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().collect<{}>({}); - result = _(list).chain().collect<{}>({}); - result = _(dictionary).chain().collect<{}>({}); - } -} - -// _.contains -module TestContains { - type SampleType = {a: string; b: number; c: boolean;}; - - let array: SampleType[]; - let list: _.List; - let dictionary: _.Dictionary; - - let target: SampleType; - - { - let result: boolean; - - result = _.contains(array, target); - result = _.contains(array, target, 42); - - result = _.contains(list, target); - result = _.contains(list, target, 42); - - result = _.contains(dictionary, target); - result = _.contains(dictionary, target, 42); - - result = _(array).contains(target); - result = _(array).contains(target, 42); - - result = _(list).contains(target); - result = _(list).contains(target, 42); - - result = _(dictionary).contains(target); - result = _(dictionary).contains(target, 42); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().contains(target); - result = _(array).chain().contains(target, 42); - - result = _(list).chain().contains(target); - result = _(list).chain().contains(target, 42); - - result = _(dictionary).chain().contains(target); - result = _(dictionary).chain().contains(target, 42); - } -} - // _.countBy module TestCountBy { let array: TResult[]; @@ -3344,54 +2915,6 @@ module TestCountBy { } } -// _.detect -module TestDetect { - let array: TResult[]; - let list: _.List; - let dictionary: _.Dictionary; - - let listIterator: (value: TResult, index: number, collection: _.List) => boolean; - let dictionaryIterator: (value: TResult, key: string, collection: _.Dictionary) => boolean; - - let result: TResult; - - result = _.detect(array); - result = _.detect(array, listIterator); - result = _.detect(array, listIterator, any); - result = _.detect(array, ''); - result = _.detect<{a: number}, TResult>(array, {a: 42}); - - result = _.detect(list); - result = _.detect(list, listIterator); - result = _.detect(list, listIterator, any); - result = _.detect(list, ''); - result = _.detect<{a: number}, TResult>(list, {a: 42}); - - result = _.detect(dictionary); - result = _.detect(dictionary, dictionaryIterator); - result = _.detect(dictionary, dictionaryIterator, any); - result = _.detect(dictionary, ''); - result = _.detect<{a: number}, TResult>(dictionary, {a: 42}); - - result = _(array).detect(); - result = _(array).detect(listIterator); - result = _(array).detect(listIterator, any); - result = _(array).detect(''); - result = _(array).detect<{a: number}>({a: 42}); - - result = _(list).detect(); - result = _(list).detect(listIterator); - result = _(list).detect(listIterator, any); - result = _(list).detect(''); - result = _(list).detect<{a: number}, TResult>({a: 42}); - - result = _(dictionary).detect(); - result = _(dictionary).detect(dictionaryIterator); - result = _(dictionary).detect(dictionaryIterator, any); - result = _(dictionary).detect(''); - result = _(dictionary).detect<{a: number}, TResult>({a: 42}); -} - // _.each module TestEach { let array: TResult[]; @@ -4151,52 +3674,6 @@ module TestGroupBy { } } -// _.include -module TestInclude { - type SampleType = {a: string; b: number; c: boolean;}; - - let array: SampleType[]; - let list: _.List; - let dictionary: _.Dictionary; - - let target: SampleType; - - { - let result: boolean; - - result = _.include(array, target); - result = _.include(array, target, 42); - - result = _.include(list, target); - result = _.include(list, target, 42); - - result = _.include(dictionary, target); - result = _.include(dictionary, target, 42); - - result = _(array).include(target); - result = _(array).include(target, 42); - - result = _(list).include(target); - result = _(list).include(target, 42); - - result = _(dictionary).include(target); - result = _(dictionary).include(target, 42); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().include(target); - result = _(array).chain().include(target, 42); - - result = _(list).chain().include(target); - result = _(list).chain().include(target, 42); - - result = _(dictionary).chain().include(target); - result = _(dictionary).chain().include(target, 42); - } -} - // _.includes module TestIncludes { type SampleType = {a: string; b: number; c: boolean;}; @@ -4589,22 +4066,6 @@ result = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function (r: ABC, num: number return r; }, {}); -result = _.foldl([1, 2, 3], function (sum: number, num: number) { - return sum + num; -}); -result = _.foldl({ 'a': 1, 'b': 2, 'c': 3 }, function (r: ABC, num: number, key: string) { - r[key] = num * 3; - return r; -}, {}); - -result = _.inject([1, 2, 3], function (sum: number, num: number) { - return sum + num; -}); -result = _.inject({ 'a': 1, 'b': 2, 'c': 3 }, function (r: ABC, num: number, key: string) { - r[key] = num * 3; - return r; -}, {}); - result = _([1, 2, 3]).reduce(function (sum: number, num: number) { return sum + num; }); @@ -4613,24 +4074,7 @@ result = _({ 'a': 1, 'b': 2, 'c': 3 }).reduce(function (r: ABC return r; }, {}); -result = _([1, 2, 3]).foldl(function (sum: number, num: number) { - return sum + num; -}); -result = _({ 'a': 1, 'b': 2, 'c': 3 }).foldl(function (r: ABC, num: number, key: string) { - r[key] = num * 3; - return r; -}, {}); - -result = _([1, 2, 3]).inject(function (sum: number, num: number) { - return sum + num; -}); -result = _({ 'a': 1, 'b': 2, 'c': 3 }).inject(function (r: ABC, num: number, key: string) { - r[key] = num * 3; - return r; -}, {}); - result = _.reduceRight([[0, 1], [2, 3], [4, 5]], function (a: number[], b: number[]) { return a.concat(b); }, []); -result = _.foldr([[0, 1], [2, 3], [4, 5]], function (a: number[], b: number[]) { return a.concat(b); }, []); // _.reject module TestReject { @@ -5229,36 +4673,6 @@ module TestAry { } } -// _.backflow -module TestBackflow { - let Fn1: (n: number) => number; - let Fn2: (m: number, n: number) => number; - - { - let result: (m: number, n: number) => number; - - result = _.backflow<(m: number, n: number) => number>(Fn1, Fn2); - result = _.backflow<(m: number, n: number) => number>(Fn1, Fn1, Fn2); - result = _.backflow<(m: number, n: number) => number>(Fn1, Fn1, Fn1, Fn2); - } - - { - let result: _.LoDashImplicitObjectWrapper<(m: number, n: number) => number>; - - result = _(Fn1).backflow<(m: number, n: number) => number>(Fn2); - result = _(Fn1).backflow<(m: number, n: number) => number>(Fn1, Fn2); - result = _(Fn1).backflow<(m: number, n: number) => number>(Fn1, Fn1, Fn2); - } - - { - let result: _.LoDashExplicitObjectWrapper<(m: number, n: number) => number>; - - result = _(Fn1).chain().backflow<(m: number, n: number) => number>(Fn2); - result = _(Fn1).chain().backflow<(m: number, n: number) => number>(Fn1, Fn2); - result = _(Fn1).chain().backflow<(m: number, n: number) => number>(Fn1, Fn1, Fn2); - } -} - // _.before module TestBefore { interface Func { @@ -5488,36 +4902,6 @@ module TestBindKey { } } -// _.compose -module TestCompose { - let Fn1: (n: number) => number; - let Fn2: (m: number, n: number) => number; - - { - let result: (m: number, n: number) => number; - - result = _.compose<(m: number, n: number) => number>(Fn1, Fn2); - result = _.compose<(m: number, n: number) => number>(Fn1, Fn1, Fn2); - result = _.compose<(m: number, n: number) => number>(Fn1, Fn1, Fn1, Fn2); - } - - { - let result: _.LoDashImplicitObjectWrapper<(m: number, n: number) => number>; - - result = _(Fn1).compose<(m: number, n: number) => number>(Fn2); - result = _(Fn1).compose<(m: number, n: number) => number>(Fn1, Fn2); - result = _(Fn1).compose<(m: number, n: number) => number>(Fn1, Fn1, Fn2); - } - - { - let result: _.LoDashExplicitObjectWrapper<(m: number, n: number) => number>; - - result = _(Fn1).chain().compose<(m: number, n: number) => number>(Fn2); - result = _(Fn1).chain().compose<(m: number, n: number) => number>(Fn1, Fn2); - result = _(Fn1).chain().compose<(m: number, n: number) => number>(Fn1, Fn1, Fn2); - } -} - var createCallbackObj: { [index: string]: string; } = { name: 'Joe' }; result = <() => any>_.createCallback('name'); result = <() => boolean>_.createCallback(createCallbackObj); @@ -8345,31 +7729,6 @@ module TestMerge { } } -// _.methods -module TestFunctions { - type SampleObject = {a: number; b: string; c: boolean;}; - - let object: SampleObject; - - { - let result: string[]; - - result = _.methods(object); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(object).methods(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(object).chain().methods(); - } -} - // _.omit module TestOmit { let predicate: (element: any, key: string, collection: any) => boolean; @@ -9147,72 +8506,6 @@ module TestAttempt { } } -// _.callback -module TestCallback { - { - let result: (...args: any[]) => TResult; - - result = _.callback(Function); - result = _.callback(Function, any); - } - - { - let result: (object: any) => TResult; - - result = _.callback(''); - result = _.callback('', any); - } - - { - let result: (object: any) => boolean; - - result = _.callback({}); - result = _.callback({}, any); - } - - { - let result: _.LoDashImplicitObjectWrapper<(...args: any[]) => TResult>; - - result = _(Function).callback(); - result = _(Function).callback(any); - } - - { - let result: _.LoDashImplicitObjectWrapper<(object: any) => TResult>; - - result = _('').callback(); - result = _('').callback(any); - } - - { - let result: _.LoDashImplicitObjectWrapper<(object: any) => boolean>; - - result = _({}).callback(); - result = _({}).callback(any); - } - - { - let result: _.LoDashExplicitObjectWrapper<(...args: any[]) => TResult>; - - result = _(Function).chain().callback(); - result = _(Function).chain().callback(any); - } - - { - let result: _.LoDashExplicitObjectWrapper<(object: any) => TResult>; - - result = _('').chain().callback(); - result = _('').chain().callback(any); - } - - { - let result: _.LoDashExplicitObjectWrapper<(object: any) => boolean>; - - result = _({}).chain().callback(); - result = _({}).chain().callback(any); - } -} - // _.constant module TestConstant { { diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 11845033b5..8500d9ecfa 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -157,20 +157,20 @@ Added 3 aliases - [x] _.first as an alias of _.head Removed 17 aliases -- [ ] Removed aliase _.all -- [ ] Removed aliase _.any -- [ ] Removed aliase _.backflow -- [ ] Removed aliase _.callback -- [ ] Removed aliase _.collect -- [ ] Removed aliase _.compose -- [ ] Removed aliase _.contains -- [ ] Removed aliase _.detect -- [ ] Removed aliase _.foldl -- [ ] Removed aliase _.foldr -- [ ] Removed aliase _.include -- [ ] Removed aliase _.inject -- [ ] Removed aliase _.methods -- [ ] Removed aliase _.object +- [x] Removed aliase _.all +- [x] Removed aliase _.any +- [x] Removed aliase _.backflow +- [x] Removed aliase _.callback +- [x] Removed aliase _.collect +- [x] Removed aliase _.compose +- [x] Removed aliase _.contains +- [x] Removed aliase _.detect +- [x] Removed aliase _.foldl +- [x] Removed aliase _.foldr +- [x] Removed aliase _.include +- [x] Removed aliase _.inject +- [x] Removed aliase _.methods +- [x] Removed aliase _.object - [x] Removed aliase _.run - [x] Removed aliase _.select - [x] Removed aliase _.unique @@ -1705,125 +1705,6 @@ declare module _ { ): LoDashExplicitWrapper; } - //_.object - interface LoDashStatic { - /** - * @see _.zipObject - */ - object( - props: List|List>, - values?: List - ): TResult; - - /** - * @see _.zipObject - */ - object( - props: List|List>, - values?: List - ): TResult; - - /** - * @see _.zipObject - */ - object( - props: List|List>, - values?: List - ): _.Dictionary; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.zipObject - */ - object( - values?: List - ): _.LoDashImplicitObjectWrapper; - - /** - * @see _.zipObject - */ - object( - values?: List - ): _.LoDashImplicitObjectWrapper; - - /** - * @see _.zipObject - */ - object( - values?: List - ): _.LoDashImplicitObjectWrapper<_.Dictionary>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.zipObject - */ - object( - values?: List - ): _.LoDashImplicitObjectWrapper; - - /** - * @see _.zipObject - */ - object( - values?: List - ): _.LoDashImplicitObjectWrapper; - - /** - * @see _.zipObject - */ - object( - values?: List - ): _.LoDashImplicitObjectWrapper<_.Dictionary>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.zipObject - */ - object( - values?: List - ): _.LoDashExplicitObjectWrapper; - - /** - * @see _.zipObject - */ - object( - values?: List - ): _.LoDashExplicitObjectWrapper; - - /** - * @see _.zipObject - */ - object( - values?: List - ): _.LoDashExplicitObjectWrapper<_.Dictionary>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.zipObject - */ - object( - values?: List - ): _.LoDashExplicitObjectWrapper; - - /** - * @see _.zipObject - */ - object( - values?: List - ): _.LoDashExplicitObjectWrapper; - - /** - * @see _.zipObject - */ - object( - values?: List - ): _.LoDashExplicitObjectWrapper<_.Dictionary>; - } - //_.pull interface LoDashStatic { /** @@ -3390,8 +3271,6 @@ declare module _ { * If an object is provided for iteratee the created _.matches style callback returns true for elements that * have the properties of the given object, else false. * - * @alias _.unique - * * @param array The array to inspect. * @param isSorted Specify the array is sorted. * @param iteratee The function invoked per iteration. @@ -3995,8 +3874,6 @@ declare module _ { * Provide either a single two dimensional array, e.g. [[key1, value1], [key2, value2]] or two arrays, one of * property names and one of corresponding values. * - * @alias _.object - * * @param props The property names. * @param values The property values. * @return Returns the new object. @@ -4503,291 +4380,6 @@ declare module _ { * Collection * **************/ - //_.all - interface LoDashStatic { - /** - * @see _.every - */ - all( - collection: List, - predicate?: ListIterator, - thisArg?: any - ): boolean; - - /** - * @see _.every - */ - all( - collection: Dictionary, - predicate?: DictionaryIterator, - thisArg?: any - ): boolean; - - /** - * @see _.every - */ - all( - collection: List|Dictionary, - predicate?: string, - thisArg?: any - ): boolean; - - /** - * @see _.every - */ - all( - collection: List|Dictionary, - predicate?: TObject - ): boolean; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.every - */ - all( - predicate?: ListIterator, - thisArg?: any - ): boolean; - - /** - * @see _.every - */ - all( - predicate?: string, - thisArg?: any - ): boolean; - - /** - * @see _.every - */ - all( - predicate?: TObject - ): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.every - */ - all( - predicate?: ListIterator|DictionaryIterator, - thisArg?: any - ): boolean; - - /** - * @see _.every - */ - all( - predicate?: string, - thisArg?: any - ): boolean; - - /** - * @see _.every - */ - all( - predicate?: TObject - ): boolean; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.every - */ - all( - predicate?: ListIterator, - thisArg?: any - ): LoDashExplicitWrapper; - - /** - * @see _.every - */ - all( - predicate?: string, - thisArg?: any - ): LoDashExplicitWrapper; - - /** - * @see _.every - */ - all( - predicate?: TObject - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.every - */ - all( - predicate?: ListIterator|DictionaryIterator, - thisArg?: any - ): LoDashExplicitWrapper; - - /** - * @see _.every - */ - all( - predicate?: string, - thisArg?: any - ): LoDashExplicitWrapper; - - /** - * @see _.every - */ - all( - predicate?: TObject - ): LoDashExplicitWrapper; - } - - //_.any - interface LoDashStatic { - /** - * @see _.some - */ - any( - collection: List, - predicate?: ListIterator, - thisArg?: any - ): boolean; - - /** - * @see _.some - */ - any( - collection: Dictionary, - predicate?: DictionaryIterator, - thisArg?: any - ): boolean; - - /** - * @see _.some - */ - any( - collection: NumericDictionary, - predicate?: NumericDictionaryIterator, - thisArg?: any - ): boolean; - - /** - * @see _.some - */ - any( - collection: List|Dictionary|NumericDictionary, - predicate?: string, - thisArg?: any - ): boolean; - - /** - * @see _.some - */ - any( - collection: List|Dictionary|NumericDictionary, - predicate?: TObject - ): boolean; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.some - */ - any( - predicate?: ListIterator|NumericDictionaryIterator, - thisArg?: any - ): boolean; - - /** - * @see _.some - */ - any( - predicate?: string, - thisArg?: any - ): boolean; - - /** - * @see _.some - */ - any( - predicate?: TObject - ): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.some - */ - any( - predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator, - thisArg?: any - ): boolean; - - /** - * @see _.some - */ - any( - predicate?: string, - thisArg?: any - ): boolean; - - /** - * @see _.some - */ - any( - predicate?: TObject - ): boolean; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.some - */ - any( - predicate?: ListIterator|NumericDictionaryIterator, - thisArg?: any - ): LoDashExplicitWrapper; - - /** - * @see _.some - */ - any( - predicate?: string, - thisArg?: any - ): LoDashExplicitWrapper; - - /** - * @see _.some - */ - any( - predicate?: TObject - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.some - */ - any( - predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator, - thisArg?: any - ): LoDashExplicitWrapper; - - /** - * @see _.some - */ - any( - predicate?: string, - thisArg?: any - ): LoDashExplicitWrapper; - - /** - * @see _.some - */ - any( - predicate?: TObject - ): LoDashExplicitWrapper; - } - //_.at interface LoDashStatic { /** @@ -4832,220 +4424,6 @@ declare module _ { at(...props: (number|string|(number|string)[])[]): LoDashExplicitArrayWrapper; } - //_.collect - interface LoDashStatic { - /** - * @see _.map - */ - collect( - collection: List, - iteratee?: ListIterator, - thisArg?: any - ): TResult[]; - - /** - * @see _.map - */ - collect( - collection: Dictionary, - iteratee?: DictionaryIterator, - thisArg?: any - ): TResult[]; - - /** - * @see _.map - */ - collect( - collection: List|Dictionary, - iteratee?: string - ): TResult[]; - - /** - * @see _.map - */ - collect( - collection: List|Dictionary, - iteratee?: TObject - ): boolean[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.map - */ - collect( - iteratee?: ListIterator, - thisArg?: any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.map - */ - collect( - iteratee?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.map - */ - collect( - iteratee?: TObject - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.map - */ - collect( - iteratee?: ListIterator|DictionaryIterator, - thisArg?: any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.map - */ - collect( - iteratee?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.map - */ - collect( - iteratee?: TObject - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.map - */ - collect( - iteratee?: ListIterator, - thisArg?: any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.map - */ - collect( - iteratee?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.map - */ - collect( - iteratee?: TObject - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.map - */ - collect( - iteratee?: ListIterator|DictionaryIterator, - thisArg?: any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.map - */ - collect( - iteratee?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.map - */ - collect( - iteratee?: TObject - ): LoDashExplicitArrayWrapper; - } - - //_.contains - interface LoDashStatic { - /** - * @see _.includes - */ - contains( - collection: List|Dictionary, - target: T, - fromIndex?: number - ): boolean; - - /** - * @see _.includes - */ - contains( - collection: string, - target: string, - fromIndex?: number - ): boolean; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.includes - */ - contains( - target: T, - fromIndex?: number - ): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.includes - */ - contains( - target: TValue, - fromIndex?: number - ): boolean; - } - - interface LoDashImplicitWrapper { - /** - * @see _.includes - */ - contains( - target: string, - fromIndex?: number - ): boolean; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.includes - */ - contains( - target: T, - fromIndex?: number - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.includes - */ - contains( - target: TValue, - fromIndex?: number - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.includes - */ - contains( - target: string, - fromIndex?: number - ): LoDashExplicitWrapper; - } - //_.countBy interface LoDashStatic { /** @@ -5238,94 +4616,6 @@ declare module _ { ): LoDashExplicitObjectWrapper>; } - //_.detect - interface LoDashStatic { - /** - * @see _.find - */ - detect( - collection: List, - predicate?: ListIterator, - thisArg?: any - ): T; - - /** - * @see _.find - */ - detect( - collection: Dictionary, - predicate?: DictionaryIterator, - thisArg?: any - ): T; - - /** - * @see _.find - */ - detect( - collection: List|Dictionary, - predicate?: string, - thisArg?: any - ): T; - - /** - * @see _.find - */ - detect( - collection: List|Dictionary, - predicate?: TObject - ): T; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.find - */ - detect( - predicate?: ListIterator, - thisArg?: any - ): T; - - /** - * @see _.find - */ - detect( - predicate?: string, - thisArg?: any - ): T; - - /** - * @see _.find - */ - detect( - predicate?: TObject - ): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.find - */ - detect( - predicate?: ListIterator|DictionaryIterator, - thisArg?: any - ): TResult; - - /** - * @see _.find - */ - detect( - predicate?: string, - thisArg?: any - ): TResult; - - /** - * @see _.find - */ - detect( - predicate?: TObject - ): TResult; - } - //_.each interface LoDashStatic { /** @@ -5557,8 +4847,6 @@ declare module _ { * If an object is provided for predicate the created _.matches style callback returns true for elements that * have the properties of the given object, else false. * - * @alias _.all - * * @param collection The collection to iterate over. * @param predicate The function invoked per iteration. * @param thisArg The this binding of predicate. @@ -5712,8 +5000,6 @@ declare module _ { * If an object is provided for predicate the created _.matches style callback returns true for elements that * have the properties of the given object, else false. * - * @alias _.select - * * @param collection The collection to iterate over. * @param predicate The function invoked per iteration. * @param thisArg The this binding of predicate. @@ -5888,8 +5174,6 @@ declare module _ { * If an object is provided for predicate the created _.matches style callback returns true for elements that * have the properties of the given object, else false. * - * @alias _.detect - * * @param collection The collection to search. * @param predicate The function invoked per iteration. * @param thisArg The this binding of predicate. @@ -6569,95 +5853,12 @@ declare module _ { ): LoDashExplicitObjectWrapper>; } - //_.include - interface LoDashStatic { - /** - * @see _.includes - */ - include( - collection: List|Dictionary, - target: T, - fromIndex?: number - ): boolean; - - /** - * @see _.includes - */ - include( - collection: string, - target: string, - fromIndex?: number - ): boolean; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.includes - */ - include( - target: T, - fromIndex?: number - ): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.includes - */ - include( - target: TValue, - fromIndex?: number - ): boolean; - } - - interface LoDashImplicitWrapper { - /** - * @see _.includes - */ - include( - target: string, - fromIndex?: number - ): boolean; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.includes - */ - include( - target: T, - fromIndex?: number - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.includes - */ - include( - target: TValue, - fromIndex?: number - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.includes - */ - include( - target: string, - fromIndex?: number - ): LoDashExplicitWrapper; - } - //_.includes interface LoDashStatic { /** * Checks if target is in collection using SameValueZero for equality comparisons. If fromIndex is negative, * it’s used as the offset from the end of collection. * - * @alias _.contains, _.include - * * @param collection The collection to search. * @param target The value to search for. * @param fromIndex The index to search from. @@ -7025,8 +6226,6 @@ declare module _ { * min, parseInt, slice, sortBy, take, takeRight, template, trim, trimLeft, trimRight, trunc, random, range, * sample, some, sum, uniq, and words * - * @alias _.collect - * * @param collection The collection to iterate over. * @param iteratee The function invoked per iteration. * @param thisArg The this binding of iteratee. @@ -7370,107 +6569,6 @@ declare module _ { callback: MemoIterator, thisArg?: any): TResult; - /** - * @see _.reduce - **/ - inject( - collection: Array, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - inject( - collection: List, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - inject( - collection: Dictionary, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - inject( - collection: Array, - callback: MemoIterator, - thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - inject( - collection: List, - callback: MemoIterator, - thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - inject( - collection: Dictionary, - callback: MemoIterator, - thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - foldl( - collection: Array, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - foldl( - collection: List, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - foldl( - collection: Dictionary, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - foldl( - collection: Array, - callback: MemoIterator, - thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - foldl( - collection: List, - callback: MemoIterator, - thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - foldl( - collection: Dictionary, - callback: MemoIterator, - thisArg?: any): TResult; } interface LoDashImplicitArrayWrapper { @@ -7488,36 +6586,6 @@ declare module _ { reduce( callback: MemoIterator, thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - inject( - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - inject( - callback: MemoIterator, - thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - foldl( - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - foldl( - callback: MemoIterator, - thisArg?: any): TResult; } interface LoDashImplicitObjectWrapper { @@ -7535,36 +6603,6 @@ declare module _ { reduce( callback: MemoIterator, thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - inject( - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - inject( - callback: MemoIterator, - thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - foldl( - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; - - /** - * @see _.reduce - **/ - foldl( - callback: MemoIterator, - thisArg?: any): TResult; } //_.reduceRight @@ -7625,57 +6663,6 @@ declare module _ { collection: Dictionary, callback: MemoIterator, thisArg?: any): TResult; - - /** - * @see _.reduceRight - **/ - foldr( - collection: Array, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; - - /** - * @see _.reduceRight - **/ - foldr( - collection: List, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; - - /** - * @see _.reduceRight - **/ - foldr( - collection: Dictionary, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; - - /** - * @see _.reduceRight - **/ - foldr( - collection: Array, - callback: MemoIterator, - thisArg?: any): TResult; - - /** - * @see _.reduceRight - **/ - foldr( - collection: List, - callback: MemoIterator, - thisArg?: any): TResult; - - /** - * @see _.reduceRight - **/ - foldr( - collection: Dictionary, - callback: MemoIterator, - thisArg?: any): TResult; } //_.reject @@ -8052,8 +7039,6 @@ declare module _ { * If an object is provided for predicate the created _.matches style callback returns true for elements that * have the properties of the given object, else false. * - * @alias _.any - * * @param collection The collection to iterate over. * @param predicate The function invoked per iteration. * @param thisArg The this binding of predicate. @@ -8852,28 +7837,6 @@ declare module _ { ary(n?: number): LoDashExplicitObjectWrapper; } - //_.backflow - interface LoDashStatic { - /** - * @see _.flowRight - */ - backflow(...funcs: Function[]): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.flowRight - */ - backflow(...funcs: Function[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.flowRight - */ - backflow(...funcs: Function[]): LoDashExplicitObjectWrapper; - } - //_.before interface LoDashStatic { /** @@ -9050,28 +8013,6 @@ declare module _ { ): LoDashExplicitObjectWrapper; } - //_.compose - interface LoDashStatic { - /** - * @see _.flowRight - */ - compose(...funcs: Function[]): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.flowRight - */ - compose(...funcs: Function[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.flowRight - */ - compose(...funcs: Function[]): LoDashExplicitObjectWrapper; - } - //_.createCallback interface LoDashStatic { /** @@ -9444,8 +8385,6 @@ declare module _ { * This method is like _.flow except that it creates a function that invokes the provided functions from right * to left. * - * @alias _.backflow, _.compose - * * @param funcs Functions to invoke. * @return Returns the new function. */ @@ -12571,8 +11510,6 @@ declare module _ { /** * Creates an array of function property names from all enumerable properties, own and inherited, of object. * - * @alias _.methods - * * @param object The object to inspect. * @return Returns the new array of property names. */ @@ -13113,28 +12050,6 @@ declare module _ { ): LoDashExplicitObjectWrapper; } - //_.methods - interface LoDashStatic { - /** - * @see _.functions - */ - methods(object: any): string[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.functions - */ - methods(): _.LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.functions - */ - methods(): _.LoDashExplicitArrayWrapper; - } - //_.omit interface LoDashStatic { /** @@ -14286,83 +13201,6 @@ declare module _ { attempt(): LoDashExplicitObjectWrapper; } - //_.callback - interface LoDashStatic { - /** - * Creates a function that invokes func with the this binding of thisArg and arguments of the created function. - * If func is a property name the created callback returns the property value for a given element. If func is - * an object the created callback returns true for elements that contain the equivalent object properties, - * otherwise it returns false. - * - * @param func The value to convert to a callback. - * @param thisArg The this binding of func. - * @result Returns the callback. - */ - callback( - func: Function, - thisArg?: any - ): (...args: any[]) => TResult; - - /** - * @see _.callback - */ - callback( - func: string, - thisArg?: any - ): (object: any) => TResult; - - /** - * @see _.callback - */ - callback( - func: Object, - thisArg?: any - ): (object: any) => boolean; - - /** - * @see _.callback - */ - callback(): (value: TResult) => TResult; - } - - interface LoDashImplicitWrapper { - /** - * @see _.callback - */ - callback(thisArg?: any): LoDashImplicitObjectWrapper<(object: any) => TResult>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.callback - */ - callback(thisArg?: any): LoDashImplicitObjectWrapper<(object: any) => boolean>; - - /** - * @see _.callback - */ - callback(thisArg?: any): LoDashImplicitObjectWrapper<(...args: any[]) => TResult>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.callback - */ - callback(thisArg?: any): LoDashExplicitObjectWrapper<(object: any) => TResult>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.callback - */ - callback(thisArg?: any): LoDashExplicitObjectWrapper<(object: any) => boolean>; - - /** - * @see _.callback - */ - callback(thisArg?: any): LoDashExplicitObjectWrapper<(...args: any[]) => TResult>; - } - //_.constant interface LoDashStatic { /** @@ -14422,7 +13260,33 @@ declare module _ { //_.iteratee interface LoDashStatic { /** - * @see _.callback + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name the created callback returns the + * property value for a given element. If `func` is an object the created + * callback returns `true` for elements that contain the equivalent object properties, otherwise it returns `false`. + * + * @static + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // create custom iteratee shorthands + * _.iteratee = _.wrap(_.iteratee, function(callback, func) { + * var p = /^(\S+)\s*([<>])\s*(\S+)$/.exec(func); + * return !p ? callback(func) : function(object) { + * return (p[2] == '>' ? object[p[1]] > p[3] : object[p[1]] < p[3]); + * }; + * }); + * + * _.filter(users, 'age > 36'); + * // => [{ 'user': 'fred', 'age': 40 }] */ iteratee( func: Function, @@ -14430,7 +13294,7 @@ declare module _ { ): (...args: any[]) => TResult; /** - * @see _.callback + * @see _.iteratee */ iteratee( func: string, @@ -14438,7 +13302,7 @@ declare module _ { ): (object: any) => TResult; /** - * @see _.callback + * @see _.iteratee */ iteratee( func: Object, @@ -14446,45 +13310,45 @@ declare module _ { ): (object: any) => boolean; /** - * @see _.callback + * @see _.iteratee */ iteratee(): (value: TResult) => TResult; } interface LoDashImplicitWrapper { /** - * @see _.callback + * @see _.iteratee */ iteratee(thisArg?: any): LoDashImplicitObjectWrapper<(object: any) => TResult>; } interface LoDashImplicitObjectWrapper { /** - * @see _.callback + * @see _.iteratee */ iteratee(thisArg?: any): LoDashImplicitObjectWrapper<(object: any) => boolean>; /** - * @see _.callback + * @see _.iteratee */ iteratee(thisArg?: any): LoDashImplicitObjectWrapper<(...args: any[]) => TResult>; } interface LoDashExplicitWrapper { /** - * @see _.callback + * @see _.iteratee */ iteratee(thisArg?: any): LoDashExplicitObjectWrapper<(object: any) => TResult>; } interface LoDashExplicitObjectWrapper { /** - * @see _.callback + * @see _.iteratee */ iteratee(thisArg?: any): LoDashExplicitObjectWrapper<(object: any) => boolean>; /** - * @see _.callback + * @see _.iteratee */ iteratee(thisArg?: any): LoDashExplicitObjectWrapper<(...args: any[]) => TResult>; }