@types/lodash 4.14.112 → 4.14.116

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
lodash/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Lo-Dash (http://lodash.com/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash
9
9
 
10
10
  Additional Details
11
- * Last updated: Sat, 14 Jul 2018 01:02:00 GMT
11
+ * Last updated: Fri, 03 Aug 2018 01:26:21 GMT
12
12
  * Dependencies: none
13
13
  * Global values: _
14
14
 
lodash/common/common.d.ts CHANGED
@@ -3,7 +3,7 @@ import _ = require("../index");
3
3
  type GlobalPartial<T> = Partial<T>;
4
4
  declare module "../index" {
5
5
  type PartialObject<T> = GlobalPartial<T>;
6
- type Many<T> = T | T[]; // TODO: Should be ReadonlyArray<T>, but requires ts2.5 to not infinitely loop
6
+ type Many<T> = T | ReadonlyArray<T>;
7
7
  interface LoDashStatic {
8
8
  /**
9
9
  * Creates a lodash object which wraps value to enable implicit method chain sequences.
@@ -179,16 +179,17 @@ declare module "../index" {
179
179
  }
180
180
 
181
181
  type NotVoid = {} | null | undefined;
182
+ type IterateeShorthand<T> = PropertyName | [PropertyName, any] | PartialDeep<T>;
182
183
  type ArrayIterator<T, TResult> = (value: T, index: number, collection: T[]) => TResult;
183
184
  type ListIterator<T, TResult> = (value: T, index: number, collection: List<T>) => TResult;
184
- type ListIteratee<T> = ListIterator<T, NotVoid> | string | [string, any] | PartialDeep<T>;
185
- type ListIterateeCustom<T, TResult> = ListIterator<T, TResult> | string | [string, any] | PartialDeep<T>;
185
+ type ListIteratee<T> = ListIterator<T, NotVoid> | IterateeShorthand<T>;
186
+ type ListIterateeCustom<T, TResult> = ListIterator<T, TResult> | IterateeShorthand<T>;
186
187
  type ListIteratorTypeGuard<T, S extends T> = (value: T, index: number, collection: List<T>) => value is S;
187
188
 
188
189
  // Note: key should be string, not keyof T, because the actual object may contain extra properties that were not specified in the type.
189
190
  type ObjectIterator<TObject, TResult> = (value: TObject[keyof TObject], key: string, collection: TObject) => TResult;
190
- type ObjectIteratee<TObject> = ObjectIterator<TObject, NotVoid> | string | [string, any] | PartialDeep<TObject[keyof TObject]>;
191
- type ObjectIterateeCustom<TObject, TResult> = ObjectIterator<TObject, TResult> | string | [string, any] | PartialDeep<TObject[keyof TObject]>;
191
+ type ObjectIteratee<TObject> = ObjectIterator<TObject, NotVoid> | IterateeShorthand<TObject[keyof TObject]>;
192
+ type ObjectIterateeCustom<TObject, TResult> = ObjectIterator<TObject, TResult> | IterateeShorthand<TObject[keyof TObject]>;
192
193
  type ObjectIteratorTypeGuard<TObject, S extends TObject[keyof TObject]> = (value: TObject[keyof TObject], key: string, collection: TObject) => value is S;
193
194
 
194
195
  type StringIterator<TResult> = (char: string, index: number, string: string) => TResult;
@@ -207,10 +208,11 @@ declare module "../index" {
207
208
  type MemoVoidDictionaryIterator<T, TResult> = (acc: TResult, curr: T, key: string, dict: Dictionary<T>) => void;
208
209
  type MemoVoidIteratorCapped<T, TResult> = (acc: TResult, curr: T) => void;
209
210
 
210
- type ValueIteratee<T> = ((value: T) => NotVoid) | string | [string, any] | PartialDeep<T>;
211
- type ValueIterateeCustom<T, TResult> = ((value: T) => TResult) | string | [string, any] | PartialDeep<T>;
211
+ type ValueIteratee<T> = ((value: T) => NotVoid) | IterateeShorthand<T>;
212
+ type ValueIterateeCustom<T, TResult> = ((value: T) => TResult) | IterateeShorthand<T>;
212
213
  type ValueIteratorTypeGuard<T, S extends T> = (value: T) => value is S;
213
- type ValueKeyIteratee<T> = ((value: T, key: string) => NotVoid) | string | [string, any] | PartialDeep<T>;
214
+ type ValueKeyIteratee<T> = ((value: T, key: string) => NotVoid) | IterateeShorthand<T>;
215
+ type ValueKeyIterateeTypeGuard<T, S extends T> = (value: T, key: string) => value is S;
214
216
  type Comparator<T> = (a: T, b: T) => boolean;
215
217
  type Comparator2<T1, T2> = (a: T1, b: T2) => boolean;
216
218
 
@@ -263,6 +265,6 @@ declare module "../index" {
263
265
  type DictionaryIteratorTypeGuard<T, S extends T> = ObjectIteratorTypeGuard<Dictionary<T>, S>;
264
266
  // NOTE: keys of objects at run time are always strings, even when a NumericDictionary is being iterated.
265
267
  type NumericDictionaryIterator<T, TResult> = (value: T, key: string, collection: NumericDictionary<T>) => TResult;
266
- type NumericDictionaryIteratee<T> = NumericDictionaryIterator<T, NotVoid> | string | [string, any] | PartialDeep<T>;
267
- type NumericDictionaryIterateeCustom<T, TResult> = NumericDictionaryIterator<T, TResult> | string | [string, any] | PartialDeep<T>;
268
+ type NumericDictionaryIteratee<T> = NumericDictionaryIterator<T, NotVoid> | IterateeShorthand<T>;
269
+ type NumericDictionaryIterateeCustom<T, TResult> = NumericDictionaryIterator<T, TResult> | IterateeShorthand<T>;
268
270
  }
lodash/common/object.d.ts CHANGED
@@ -3111,11 +3111,19 @@ declare module "../index" {
3111
3111
  * _.pickBy(object, _.isNumber);
3112
3112
  * // => { 'a': 1, 'c': 3 }
3113
3113
  */
3114
- pickBy<T extends object, S extends T[keyof T]>(
3115
- object: T | null | undefined,
3116
- predicate: ObjectIteratorTypeGuard<T, S>
3114
+ pickBy<T, S extends T>(
3115
+ object: Dictionary<T> | null | undefined,
3116
+ predicate: ValueKeyIterateeTypeGuard<T, S>
3117
3117
  ): Dictionary<S>;
3118
3118
 
3119
+ /**
3120
+ * @see _.pickBy
3121
+ */
3122
+ pickBy<T, S extends T>(
3123
+ object: NumericDictionary<T> | null | undefined,
3124
+ predicate: ValueKeyIterateeTypeGuard<T, S>
3125
+ ): NumericDictionary<S>;
3126
+
3119
3127
  /**
3120
3128
  * @see _.pickBy
3121
3129
  */
@@ -3145,11 +3153,19 @@ declare module "../index" {
3145
3153
  /**
3146
3154
  * @see _.pickBy
3147
3155
  */
3148
- pickBy<T extends object, S extends T[keyof T]>(
3149
- this: LoDashImplicitWrapper<T | null | undefined>,
3150
- predicate: ObjectIteratorTypeGuard<T, S>
3156
+ pickBy<T, S extends T>(
3157
+ this: LoDashImplicitWrapper<Dictionary<T> | null | undefined>,
3158
+ predicate: ValueKeyIterateeTypeGuard<T, S>
3151
3159
  ): LoDashImplicitWrapper<Dictionary<S>>;
3152
3160
 
3161
+ /**
3162
+ * @see _.pickBy
3163
+ */
3164
+ pickBy<T, S extends T>(
3165
+ this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
3166
+ predicate: ValueKeyIterateeTypeGuard<T, S>
3167
+ ): LoDashImplicitWrapper<NumericDictionary<S>>;
3168
+
3153
3169
  /**
3154
3170
  * @see _.pickBy
3155
3171
  */
@@ -3179,11 +3195,19 @@ declare module "../index" {
3179
3195
  /**
3180
3196
  * @see _.pickBy
3181
3197
  */
3182
- pickBy<T extends object, S extends T[keyof T]>(
3183
- this: LoDashExplicitWrapper<T | null | undefined>,
3184
- predicate: ObjectIteratorTypeGuard<T, S>
3198
+ pickBy<T, S extends T>(
3199
+ this: LoDashExplicitWrapper<Dictionary<T> | null | undefined>,
3200
+ predicate: ValueKeyIterateeTypeGuard<T, S>
3185
3201
  ): LoDashExplicitWrapper<Dictionary<S>>;
3186
3202
 
3203
+ /**
3204
+ * @see _.pickBy
3205
+ */
3206
+ pickBy<T, S extends T>(
3207
+ this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
3208
+ predicate: ValueKeyIterateeTypeGuard<T, S>
3209
+ ): LoDashExplicitWrapper<NumericDictionary<S>>;
3210
+
3187
3211
  /**
3188
3212
  * @see _.pickBy
3189
3213
  */
lodash/fp.d.ts CHANGED
@@ -2887,28 +2887,35 @@ declare namespace _ {
2887
2887
  type LodashPick2x1 = <T>(object: T | null | undefined) => lodash.PartialDeep<T>;
2888
2888
  type LodashPick2x2<T> = (props: lodash.PropertyPath) => lodash.PartialDeep<T>;
2889
2889
  interface LodashPickBy {
2890
- <T extends object, S extends T[keyof T]>(predicate: lodash.ValueIteratorTypeGuard<T[keyof T], S>): LodashPickBy1x1<T, S>;
2891
- <T extends object>(predicate: lodash.__, object: T | null | undefined): LodashPickBy1x2<T>;
2892
- <T extends object, S extends T[keyof T]>(predicate: lodash.ValueIteratorTypeGuard<T[keyof T], S>, object: T | null | undefined): lodash.Dictionary<S>;
2893
- <T>(predicate: lodash.ValueKeyIteratee<T>): LodashPickBy2x1<T>;
2894
- <T>(predicate: lodash.__, object: lodash.Dictionary<T> | null | undefined): LodashPickBy2x2<T>;
2890
+ <T, S extends T>(predicate: lodash.ValueKeyIterateeTypeGuard<T, S>): LodashPickBy1x1<T, S>;
2891
+ <T>(predicate: lodash.__, object: lodash.Dictionary<T> | null | undefined): LodashPickBy1x2<T>;
2892
+ <T, S extends T>(predicate: lodash.ValueKeyIterateeTypeGuard<T, S>, object: lodash.Dictionary<T> | null | undefined): lodash.Dictionary<S>;
2893
+ <T>(predicate: lodash.__, object: lodash.NumericDictionary<T> | null | undefined): LodashPickBy2x2<T>;
2894
+ <T, S extends T>(predicate: lodash.ValueKeyIterateeTypeGuard<T, S>, object: lodash.NumericDictionary<T> | null | undefined): lodash.NumericDictionary<S>;
2895
+ <T>(predicate: lodash.ValueKeyIteratee<T>): LodashPickBy3x1<T>;
2895
2896
  <T>(predicate: lodash.ValueKeyIteratee<T>, object: lodash.Dictionary<T> | null | undefined): lodash.Dictionary<T>;
2896
- <T>(predicate: lodash.__, object: lodash.NumericDictionary<T> | null | undefined): LodashPickBy3x2<T>;
2897
2897
  <T>(predicate: lodash.ValueKeyIteratee<T>, object: lodash.NumericDictionary<T> | null | undefined): lodash.NumericDictionary<T>;
2898
+ <T extends object>(predicate: lodash.__, object: T | null | undefined): LodashPickBy5x2<T>;
2898
2899
  <T extends object>(predicate: lodash.ValueKeyIteratee<T[keyof T]>, object: T | null | undefined): lodash.PartialObject<T>;
2899
2900
  }
2900
- type LodashPickBy1x1<T, S> = (object: T | null | undefined) => lodash.Dictionary<S>;
2901
+ interface LodashPickBy1x1<T, S> {
2902
+ (object: lodash.Dictionary<T> | null | undefined): lodash.Dictionary<S>;
2903
+ (object: lodash.NumericDictionary<T> | null | undefined): lodash.NumericDictionary<S>;
2904
+ }
2901
2905
  interface LodashPickBy1x2<T> {
2902
- <S extends T[keyof T]>(predicate: lodash.ValueIteratorTypeGuard<T[keyof T], S>): lodash.Dictionary<S>;
2903
- (predicate: lodash.ValueKeyIteratee<T[keyof T]>): lodash.PartialObject<T>;
2906
+ <S extends T>(predicate: lodash.ValueKeyIterateeTypeGuard<T, S>): lodash.Dictionary<S>;
2907
+ (predicate: lodash.ValueKeyIteratee<T>): lodash.Dictionary<T>;
2908
+ }
2909
+ interface LodashPickBy2x2<T> {
2910
+ <S extends T>(predicate: lodash.ValueKeyIterateeTypeGuard<T, S>): lodash.NumericDictionary<S>;
2911
+ (predicate: lodash.ValueKeyIteratee<T>): lodash.NumericDictionary<T>;
2904
2912
  }
2905
- interface LodashPickBy2x1<T> {
2913
+ interface LodashPickBy3x1<T> {
2906
2914
  (object: lodash.Dictionary<T> | null | undefined): lodash.Dictionary<T>;
2907
2915
  (object: lodash.NumericDictionary<T> | null | undefined): lodash.NumericDictionary<T>;
2908
2916
  <T1 extends object>(object: T1 | null | undefined): lodash.PartialObject<T1>;
2909
2917
  }
2910
- type LodashPickBy2x2<T> = (predicate: lodash.ValueKeyIteratee<T>) => lodash.Dictionary<T>;
2911
- type LodashPickBy3x2<T> = (predicate: lodash.ValueKeyIteratee<T>) => lodash.NumericDictionary<T>;
2918
+ type LodashPickBy5x2<T> = (predicate: lodash.ValueKeyIteratee<T[keyof T]>) => lodash.PartialObject<T>;
2912
2919
  interface LodashProp {
2913
2920
  <TObject extends object, TKey extends keyof TObject>(path: TKey | [TKey]): LodashProp1x1<TObject, TKey>;
2914
2921
  <TObject extends object>(path: lodash.__, object: TObject): LodashProp1x2<TObject>;
lodash/index.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  // Jack Moore <https://github.com/jtmthf>,
11
11
  // Dominique Rau <https://github.com/DomiR>
12
12
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
13
- // TypeScript Version: 2.2
13
+ // TypeScript Version: 2.6
14
14
 
15
15
  /// <reference path="./common/common.d.ts" />
16
16
  /// <reference path="./common/array.d.ts" />
lodash/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/lodash",
3
- "version": "4.14.112",
3
+ "version": "4.14.116",
4
4
  "description": "TypeScript definitions for Lo-Dash",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -57,6 +57,6 @@
57
57
  },
58
58
  "scripts": {},
59
59
  "dependencies": {},
60
- "typesPublisherContentHash": "fcf496a9df182f3805d4670308bcd956bed73c43e2d4660f8bbc01185a34468f",
61
- "typeScriptVersion": "2.2"
60
+ "typesPublisherContentHash": "af06d9f4d97ed2d9f5b3e47f88c0d02e5e430d399b1abebc63b011acda82e9ba",
61
+ "typeScriptVersion": "2.6"
62
62
  }