@types/lodash 4.14.48 → 4.14.52

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,9 +8,8 @@ This package contains type definitions for Lo-Dash (http://lodash.com/).
8
8
  Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/lodash
9
9
 
10
10
  Additional Details
11
- * Last updated: Mon, 09 Jan 2017 18:04:30 GMT
12
- * Library Dependencies: none
13
- * Module Dependencies: none
11
+ * Last updated: Mon, 30 Jan 2017 18:31:48 GMT
12
+ * Dependencies: none
14
13
  * Global values: _
15
14
 
16
15
  # Credits
lodash/index.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  // Project: http://lodash.com/
3
3
  // Definitions by: Brian Zengel <https://github.com/bczengel>, Ilya Mochalov <https://github.com/chrootsu>, Stepan Mikhaylyuk <https://github.com/stepancar>
4
4
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
+ // TypeScript Version: 2.1
5
6
 
6
7
  /**
7
8
  ### 4.0.0 Changelog (https://github.com/lodash/lodash/wiki/Changelog)
@@ -68,7 +69,7 @@ added 23 array methods:
68
69
  - [x] _.xorBy
69
70
  - [x] _.xorWith
70
71
 
71
- added 18 lang methods:
72
+ added 20 lang methods:
72
73
  - [x] _.cloneDeepWith
73
74
  - [x] _.cloneWith
74
75
  - [x] _.eq
@@ -87,6 +88,8 @@ added 18 lang methods:
87
88
  - [x] _.toNumber
88
89
  - [x] _.toSafeInteger
89
90
  - [x] _.toString
91
+ - [X] _.conforms
92
+ - [X] _.conformsTo
90
93
 
91
94
  added 13 object methods:
92
95
  - [x] _.assignIn
@@ -225,7 +228,6 @@ Methods:
225
228
  - [ ] _.split
226
229
 
227
230
  - [ ] _.cond
228
- - [ ] _.conforms
229
231
  - [ ] _.nthArg
230
232
  - [ ] _.over
231
233
  - [ ] _.overEvery
@@ -241,7 +243,10 @@ export as namespace _;
241
243
 
242
244
  declare var _: _.LoDashStatic;
243
245
 
246
+ type PartialObject<T> = Partial<T>;
247
+
244
248
  declare namespace _ {
249
+
245
250
  type Many<T> = T | T[];
246
251
 
247
252
  interface LoDashStatic {
@@ -6558,9 +6563,9 @@ declare namespace _ {
6558
6563
  /**
6559
6564
  * @see _.every
6560
6565
  */
6561
- every<TObject extends {}, T>(
6566
+ every<T>(
6562
6567
  collection: List<T>|Dictionary<T>|NumericDictionary<T>,
6563
- predicate?: TObject
6568
+ predicate?: PartialObject<T>
6564
6569
  ): boolean;
6565
6570
  }
6566
6571
 
@@ -6582,8 +6587,8 @@ declare namespace _ {
6582
6587
  /**
6583
6588
  * @see _.every
6584
6589
  */
6585
- every<TObject extends {}>(
6586
- predicate?: TObject
6590
+ every(
6591
+ predicate?: PartialObject<T>
6587
6592
  ): boolean;
6588
6593
  }
6589
6594
 
@@ -6605,8 +6610,8 @@ declare namespace _ {
6605
6610
  /**
6606
6611
  * @see _.every
6607
6612
  */
6608
- every<TObject extends {}>(
6609
- predicate?: TObject
6613
+ every<TResult>(
6614
+ predicate?: PartialObject<TResult>
6610
6615
  ): boolean;
6611
6616
  }
6612
6617
 
@@ -6628,8 +6633,8 @@ declare namespace _ {
6628
6633
  /**
6629
6634
  * @see _.every
6630
6635
  */
6631
- every<TObject extends {}>(
6632
- predicate?: TObject
6636
+ every(
6637
+ predicate?: PartialObject<T>
6633
6638
  ): LoDashExplicitWrapper<boolean>;
6634
6639
  }
6635
6640
 
@@ -6651,8 +6656,8 @@ declare namespace _ {
6651
6656
  /**
6652
6657
  * @see _.every
6653
6658
  */
6654
- every<TObject extends {}>(
6655
- predicate?: TObject
6659
+ every<TResult>(
6660
+ predicate?: PartialObject<TResult>
6656
6661
  ): LoDashExplicitWrapper<boolean>;
6657
6662
  }
6658
6663
 
@@ -6708,9 +6713,9 @@ declare namespace _ {
6708
6713
  /**
6709
6714
  * @see _.filter
6710
6715
  */
6711
- filter<W extends {}, T>(
6716
+ filter<T>(
6712
6717
  collection: List<T>|Dictionary<T>,
6713
- predicate: W
6718
+ predicate: PartialObject<T>
6714
6719
  ): T[];
6715
6720
  }
6716
6721
 
@@ -6741,7 +6746,7 @@ declare namespace _ {
6741
6746
  /**
6742
6747
  * @see _.filter
6743
6748
  */
6744
- filter<W>(predicate: W): LoDashImplicitArrayWrapper<T>;
6749
+ filter(predicate: PartialObject<T>): LoDashImplicitArrayWrapper<T>;
6745
6750
  }
6746
6751
 
6747
6752
  interface LoDashImplicitObjectWrapper<T> {
@@ -6762,7 +6767,7 @@ declare namespace _ {
6762
6767
  /**
6763
6768
  * @see _.filter
6764
6769
  */
6765
- filter<W, T>(predicate: W): LoDashImplicitArrayWrapper<T>;
6770
+ filter<T>(predicate: PartialObject<T>): LoDashImplicitArrayWrapper<T>;
6766
6771
  }
6767
6772
 
6768
6773
  interface LoDashExplicitWrapper<T> {
@@ -6792,7 +6797,7 @@ declare namespace _ {
6792
6797
  /**
6793
6798
  * @see _.filter
6794
6799
  */
6795
- filter<W>(predicate: W): LoDashExplicitArrayWrapper<T>;
6800
+ filter(predicate: PartialObject<T>): LoDashExplicitArrayWrapper<T>;
6796
6801
  }
6797
6802
 
6798
6803
  interface LoDashExplicitObjectWrapper<T> {
@@ -6813,7 +6818,7 @@ declare namespace _ {
6813
6818
  /**
6814
6819
  * @see _.filter
6815
6820
  */
6816
- filter<W, T>(predicate: W): LoDashExplicitArrayWrapper<T>;
6821
+ filter<T>(predicate: PartialObject<T>): LoDashExplicitArrayWrapper<T>;
6817
6822
  }
6818
6823
 
6819
6824
  //_.find
@@ -6863,9 +6868,9 @@ declare namespace _ {
6863
6868
  /**
6864
6869
  * @see _.find
6865
6870
  */
6866
- find<TObject extends {}, T>(
6871
+ find<T>(
6867
6872
  collection: List<T>|Dictionary<T>,
6868
- predicate?: TObject,
6873
+ predicate?: PartialObject<T>,
6869
6874
  fromIndex?: number
6870
6875
  ): T|undefined;
6871
6876
  }
@@ -6890,8 +6895,8 @@ declare namespace _ {
6890
6895
  /**
6891
6896
  * @see _.find
6892
6897
  */
6893
- find<TObject extends {}>(
6894
- predicate?: TObject,
6898
+ find(
6899
+ predicate?: PartialObject<T>,
6895
6900
  fromIndex?: number
6896
6901
  ): T|undefined;
6897
6902
  }
@@ -6916,8 +6921,8 @@ declare namespace _ {
6916
6921
  /**
6917
6922
  * @see _.find
6918
6923
  */
6919
- find<TObject extends {}, TResult>(
6920
- predicate?: TObject,
6924
+ find<TResult>(
6925
+ predicate?: PartialObject<TResult>,
6921
6926
  fromIndex?: number
6922
6927
  ): TResult|undefined;
6923
6928
  }
@@ -9204,9 +9209,9 @@ declare namespace _ {
9204
9209
  /**
9205
9210
  * @see _.some
9206
9211
  */
9207
- some<TObject extends {}, T>(
9212
+ some<T>(
9208
9213
  collection: List<T>|Dictionary<T>|NumericDictionary<T>,
9209
- predicate?: TObject
9214
+ predicate?: PartialObject<T>
9210
9215
  ): boolean;
9211
9216
 
9212
9217
  /**
@@ -9214,15 +9219,15 @@ declare namespace _ {
9214
9219
  */
9215
9220
  some<T>(
9216
9221
  collection: List<T>|Dictionary<T>|NumericDictionary<T>,
9217
- predicate?: Object
9222
+ predicate?: PartialObject<T>
9218
9223
  ): boolean;
9219
9224
 
9220
9225
  /**
9221
9226
  * @see _.some
9222
9227
  */
9223
- some<TObject extends {}>(
9228
+ some<T>(
9224
9229
  collection: Object,
9225
- predicate?: TObject
9230
+ predicate?: PartialObject<T>
9226
9231
  ): boolean;
9227
9232
  }
9228
9233
 
@@ -9244,8 +9249,8 @@ declare namespace _ {
9244
9249
  /**
9245
9250
  * @see _.some
9246
9251
  */
9247
- some<TObject extends {}>(
9248
- predicate?: TObject
9252
+ some(
9253
+ predicate?: PartialObject<T>
9249
9254
  ): boolean;
9250
9255
  }
9251
9256
 
@@ -9267,8 +9272,8 @@ declare namespace _ {
9267
9272
  /**
9268
9273
  * @see _.some
9269
9274
  */
9270
- some<TObject extends {}>(
9271
- predicate?: TObject
9275
+ some<TResult>(
9276
+ predicate?: PartialObject<TResult>
9272
9277
  ): boolean;
9273
9278
  }
9274
9279
 
@@ -9290,8 +9295,8 @@ declare namespace _ {
9290
9295
  /**
9291
9296
  * @see _.some
9292
9297
  */
9293
- some<TObject extends {}>(
9294
- predicate?: TObject
9298
+ some(
9299
+ predicate?: PartialObject<T>
9295
9300
  ): LoDashExplicitWrapper<boolean>;
9296
9301
  }
9297
9302
 
@@ -9313,8 +9318,8 @@ declare namespace _ {
9313
9318
  /**
9314
9319
  * @see _.some
9315
9320
  */
9316
- some<TObject extends {}>(
9317
- predicate?: TObject
9321
+ some<TResult>(
9322
+ predicate?: PartialObject<TResult>
9318
9323
  ): LoDashExplicitWrapper<boolean>;
9319
9324
  }
9320
9325
 
@@ -11432,6 +11437,33 @@ declare namespace _ {
11432
11437
  ): LoDashExplicitObjectWrapper<TResult>;
11433
11438
  }
11434
11439
 
11440
+ /**
11441
+ * An object containing predicate functions for each property of T
11442
+ */
11443
+ type ConformsPredicateObject<T> = {
11444
+ [P in keyof T]: (val: T[P]) => boolean;
11445
+ };
11446
+
11447
+ //_.conforms
11448
+ interface LoDashStatic {
11449
+ /**
11450
+ * Creates a function that invokes the predicate properties of `source` with the corresponding
11451
+ * property values of a given object, returning true if all predicates return truthy, else false.
11452
+ */
11453
+ conforms<T>(source: ConformsPredicateObject<T>): (Target: T) => boolean;
11454
+ }
11455
+
11456
+ //_.conformsTo
11457
+ interface LoDashStatic {
11458
+ /**
11459
+ * Checks if object conforms to source by invoking the predicate properties of source with the
11460
+ * corresponding property values of object.
11461
+ *
11462
+ * Note: This method is equivalent to _.conforms when source is partially applied.
11463
+ */
11464
+ conformsTo<T>(object: T, source: ConformsPredicateObject<T>): boolean;
11465
+ }
11466
+
11435
11467
  //_.eq
11436
11468
  interface LoDashStatic {
11437
11469
  /**
@@ -17153,14 +17185,35 @@ declare namespace _ {
17153
17185
  * @param object The object to query.
17154
17186
  * @return Returns an array of property values.
17155
17187
  */
17156
- values<T>(object?: Dictionary<T>): T[];
17188
+ values<T>(object?: Dictionary<T>|NumericDictionary<T>|List<T>): T[];
17157
17189
 
17158
- /**
17159
- * @see _.values
17160
- */
17190
+ /**
17191
+ * @see _.values
17192
+ */
17161
17193
  values<T>(object?: any): T[];
17162
17194
  }
17163
17195
 
17196
+ interface LoDashImplicitStringWrapper {
17197
+ /**
17198
+ * @see _.values
17199
+ */
17200
+ values(): LoDashImplicitArrayWrapper<string>;
17201
+ }
17202
+
17203
+ interface LoDashImplicitWrapper<T> {
17204
+ /**
17205
+ * @see _.values
17206
+ */
17207
+ values(): LoDashImplicitArrayWrapper<any>;
17208
+ }
17209
+
17210
+ interface LoDashImplicitArrayWrapper<T> {
17211
+ /**
17212
+ * @see _.values
17213
+ */
17214
+ values(): LoDashImplicitArrayWrapper<T>;
17215
+ }
17216
+
17164
17217
  interface LoDashImplicitObjectWrapper<T> {
17165
17218
  /**
17166
17219
  * @see _.values
@@ -17168,6 +17221,20 @@ declare namespace _ {
17168
17221
  values<T>(): LoDashImplicitArrayWrapper<T>;
17169
17222
  }
17170
17223
 
17224
+ interface LoDashExplicitWrapper<T> {
17225
+ /**
17226
+ * @see _.values
17227
+ */
17228
+ values<T>(): LoDashExplicitArrayWrapper<T>;
17229
+ }
17230
+
17231
+ interface LoDashExplicitArrayWrapper<T> {
17232
+ /**
17233
+ * @see _.values
17234
+ */
17235
+ values(): LoDashExplicitArrayWrapper<T>;
17236
+ }
17237
+
17171
17238
  interface LoDashExplicitObjectWrapper<T> {
17172
17239
  /**
17173
17240
  * @see _.values
@@ -19097,6 +19164,123 @@ declare namespace _ {
19097
19164
  runInContext(): typeof _;
19098
19165
  }
19099
19166
 
19167
+ // _.stubArray
19168
+ interface LoDashStatic {
19169
+ /**
19170
+ * This method returns a new empty array.
19171
+ *
19172
+ * @returns Returns the new empty array.
19173
+ */
19174
+ stubArray(): any[];
19175
+ }
19176
+
19177
+ interface LoDashImplicitWrapperBase<T, TWrapper> {
19178
+ /**
19179
+ * @see _.stubArray
19180
+ */
19181
+ stubArray(): any[];
19182
+ }
19183
+
19184
+ interface LoDashExplicitWrapperBase<T, TWrapper> {
19185
+ /**
19186
+ * @see _.stubArray
19187
+ */
19188
+ stubArray(): _.LoDashExplicitArrayWrapper<any>;
19189
+ }
19190
+
19191
+ // _.stubFalse
19192
+ interface LoDashStatic {
19193
+ /**
19194
+ * This method returns `false`.
19195
+ *
19196
+ * @returns Returns `false`.
19197
+ */
19198
+ stubFalse(): boolean;
19199
+ }
19200
+
19201
+ interface LoDashImplicitWrapperBase<T, TWrapper> {
19202
+ /**
19203
+ * @see _.stubFalse
19204
+ */
19205
+ stubFalse(): boolean;
19206
+ }
19207
+
19208
+ interface LoDashExplicitWrapperBase<T, TWrapper> {
19209
+ /**
19210
+ * @see _.stubFalse
19211
+ */
19212
+ stubFalse(): _.LoDashExplicitWrapper<boolean>;
19213
+ }
19214
+
19215
+ interface LoDashStatic {
19216
+ /**
19217
+ * This method returns a new empty object.
19218
+ *
19219
+ * @returns Returns the new empty object.
19220
+ */
19221
+ stubObject(): Object;
19222
+ }
19223
+
19224
+ interface LoDashImplicitWrapperBase<T, TWrapper> {
19225
+ /**
19226
+ * @see _.stubObject
19227
+ */
19228
+ stubObject(): Object;
19229
+ }
19230
+
19231
+ interface LoDashExplicitWrapperBase<T, TWrapper> {
19232
+ /**
19233
+ * @see _.stubObject
19234
+ */
19235
+ stubObject(): _.LoDashExplicitObjectWrapper<Object>;
19236
+ }
19237
+
19238
+ interface LoDashStatic {
19239
+ /**
19240
+ * This method returns an empty string.
19241
+ *
19242
+ * @returns Returns the empty string.
19243
+ */
19244
+ stubString(): string;
19245
+ }
19246
+
19247
+ interface LoDashImplicitWrapperBase<T, TWrapper> {
19248
+ /**
19249
+ * @see _.stubString
19250
+ */
19251
+ stubString(): string;
19252
+ }
19253
+
19254
+ interface LoDashExplicitWrapperBase<T, TWrapper> {
19255
+ /**
19256
+ * @see _.stubString
19257
+ */
19258
+ stubString(): _.LoDashExplicitWrapper<string>;
19259
+ }
19260
+
19261
+ interface LoDashStatic {
19262
+ /**
19263
+ * This method returns `true`.
19264
+ *
19265
+ * @returns Returns `true`.
19266
+ */
19267
+ stubTrue(): boolean;
19268
+ }
19269
+
19270
+ interface LoDashImplicitWrapperBase<T, TWrapper> {
19271
+ /**
19272
+ * @see _.stubTrue
19273
+ */
19274
+ stubTrue(): boolean;
19275
+ }
19276
+
19277
+ interface LoDashExplicitWrapperBase<T, TWrapper> {
19278
+ /**
19279
+ * @see _.stubTrue
19280
+ */
19281
+ stubTrue(): _.LoDashExplicitWrapper<boolean>;
19282
+ }
19283
+
19100
19284
  //_.times
19101
19285
  interface LoDashStatic {
19102
19286
  /**
lodash/meanBy/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- import * as _ from "../index";
2
- declare const meanBy: typeof _.meanBy;
3
- export = meanBy;
1
+ import { meanBy } from "../index";
2
+ export = meanBy;
lodash/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/lodash",
3
- "version": "4.14.48",
3
+ "version": "4.14.52",
4
4
  "description": "TypeScript definitions for Lo-Dash",
5
5
  "license": "MIT",
6
6
  "author": "Brian Zengel <https://github.com/bczengel>, Ilya Mochalov <https://github.com/chrootsu>, Stepan Mikhaylyuk <https://github.com/stepancar>",
@@ -12,6 +12,6 @@
12
12
  "scripts": {},
13
13
  "dependencies": {},
14
14
  "peerDependencies": {},
15
- "typesPublisherContentHash": "99793e0619795e2fd35141c60009efe99b9147acfa73ca624b17efb17e5c1e92",
16
- "typeScriptVersion": "2.0"
15
+ "typesPublisherContentHash": "1232780a04f9133ed4be974a68ebfddcd83178d62c5da8e7141b0c12a7129c6f",
16
+ "typeScriptVersion": "2.1"
17
17
  }