Skip to content
This repository was archived by the owner on Jul 9, 2021. It is now read-only.

Commit 7d08bf9

Browse files
committed
[fixed] renamed type Iterable -> IterableCollection in the lodash interface file to make it work with Flow >=0.38.0
1 parent 8da6ce7 commit 7d08bf9

1 file changed

Lines changed: 34 additions & 34 deletions

File tree

interfaces/lodash.js

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type IsEqualCustomizer = (objValue: any, othValue: any, key?: number | string, o
66
type TransformCallback = (accumulator: any, value: any, key: number | string, collection: any[] | Object) => any;
77
type Callback = (value: any, key: number | string, collection: any[] | Object) => any;
88
type Iteratee = Callback | Object | any[] | string;
9-
type Iterable = any[] | Object | string;
9+
type IterableCollection = any[] | Object | string;
1010
type Path = string | string[];
1111
type DebounceOptions = {
1212
leading?: boolean;
@@ -292,115 +292,115 @@ declare module 'lodash/zipWith' {
292292
// Collection
293293

294294
declare module 'lodash/countBy' {
295-
declare function exports(collection: Iterable, iteratee?: Iteratee): Object;
295+
declare function exports(collection: IterableCollection, iteratee?: Iteratee): Object;
296296
}
297297

298298
declare module 'lodash/each' {
299-
declare function exports(collection: Iterable, iteratee?: Iteratee): Iterable;
299+
declare function exports(collection: IterableCollection, iteratee?: Iteratee): IterableCollection;
300300
}
301301

302302
declare module 'lodash/eachRight' {
303-
declare function exports(collection: Iterable, iteratee?: Iteratee): Iterable;
303+
declare function exports(collection: IterableCollection, iteratee?: Iteratee): IterableCollection;
304304
}
305305

306306
declare module 'lodash/every' {
307-
declare function exports(collection: Iterable, iteratee?: Iteratee): boolean;
307+
declare function exports(collection: IterableCollection, iteratee?: Iteratee): boolean;
308308
}
309309

310310
declare module 'lodash/filter' {
311-
declare function exports(collection: Iterable, iteratee?: Iteratee): any[];
311+
declare function exports(collection: IterableCollection, iteratee?: Iteratee): any[];
312312
}
313313

314314
declare module 'lodash/find' {
315-
declare function exports(collection: Iterable, iteratee?: Iteratee, fromIndex?: number): any;
315+
declare function exports(collection: IterableCollection, iteratee?: Iteratee, fromIndex?: number): any;
316316
}
317317

318318
declare module 'lodash/findLast' {
319-
declare function exports(collection: Iterable, iteratee?: Iteratee, fromIndex?: number): any;
319+
declare function exports(collection: IterableCollection, iteratee?: Iteratee, fromIndex?: number): any;
320320
}
321321

322322
declare module 'lodash/flatMap' {
323-
declare function exports(collection: Iterable, iteratee?: Iteratee): any[];
323+
declare function exports(collection: IterableCollection, iteratee?: Iteratee): any[];
324324
}
325325

326326
declare module 'lodash/flatMapDeep' {
327-
declare function exports(collection: Iterable, iteratee?: Iteratee): any[];
327+
declare function exports(collection: IterableCollection, iteratee?: Iteratee): any[];
328328
}
329329

330330
declare module 'lodash/flatMapDepth' {
331-
declare function exports(collection: Iterable, iteratee?: Iteratee, depth?: number): any[];
331+
declare function exports(collection: IterableCollection, iteratee?: Iteratee, depth?: number): any[];
332332
}
333333

334334
declare module 'lodash/forEach' {
335-
declare function exports(collection: Iterable, iteratee?: Iteratee): Iterable;
335+
declare function exports(collection: IterableCollection, iteratee?: Iteratee): IterableCollection;
336336
}
337337

338338
declare module 'lodash/forEachRight' {
339-
declare function exports(collection: Iterable, iteratee?: Iteratee): Iterable;
339+
declare function exports(collection: IterableCollection, iteratee?: Iteratee): IterableCollection;
340340
}
341341

342342
declare module 'lodash/groupBy' {
343-
declare function exports(collection: Iterable, iteratee?: Iteratee): Object;
343+
declare function exports(collection: IterableCollection, iteratee?: Iteratee): Object;
344344
}
345345

346346
declare module 'lodash/includes' {
347-
declare function exports(collection: Iterable, value: any, fromIndex?: number): boolean;
347+
declare function exports(collection: IterableCollection, value: any, fromIndex?: number): boolean;
348348
}
349349

350350
declare module 'lodash/invokeMap' {
351-
declare function exports(collection: Iterable, path: Path | Function, ...args: any[]): any[];
351+
declare function exports(collection: IterableCollection, path: Path | Function, ...args: any[]): any[];
352352
}
353353

354354
declare module 'lodash/keyBy' {
355-
declare function exports(collection: Iterable, iteratee?: Iteratee): Object;
355+
declare function exports(collection: IterableCollection, iteratee?: Iteratee): Object;
356356
}
357357

358358
declare module 'lodash/map' {
359-
declare function exports(collection: Iterable, iteratee?: Iteratee): any[];
359+
declare function exports(collection: IterableCollection, iteratee?: Iteratee): any[];
360360
}
361361

362362
declare module 'lodash/orderBy' {
363-
declare function exports(collection: Iterable, iteratees?: Iteratee[], orders?: string[]): any[];
363+
declare function exports(collection: IterableCollection, iteratees?: Iteratee[], orders?: string[]): any[];
364364
}
365365

366366
declare module 'lodash/partition' {
367-
declare function exports(collection: Iterable, iteratee?: Iteratee): any[];
367+
declare function exports(collection: IterableCollection, iteratee?: Iteratee): any[];
368368
}
369369

370370
declare module 'lodash/reduce' {
371-
declare function exports(collection: Iterable, iteratee?: TransformCallback, accumulator?: any): any;
371+
declare function exports(collection: IterableCollection, iteratee?: TransformCallback, accumulator?: any): any;
372372
}
373373

374374
declare module 'lodash/reduceRight' {
375-
declare function exports(collection: Iterable, iteratee?: TransformCallback, accumulator?: any): any;
375+
declare function exports(collection: IterableCollection, iteratee?: TransformCallback, accumulator?: any): any;
376376
}
377377

378378
declare module 'lodash/reject' {
379-
declare function exports(collection: Iterable, iteratee?: Iteratee): any[];
379+
declare function exports(collection: IterableCollection, iteratee?: Iteratee): any[];
380380
}
381381

382382
declare module 'lodash/sample' {
383-
declare function exports(collection: Iterable): any;
383+
declare function exports(collection: IterableCollection): any;
384384
}
385385

386386
declare module 'lodash/sampleSize' {
387-
declare function exports(collection: Iterable, n?: number): any[];
387+
declare function exports(collection: IterableCollection, n?: number): any[];
388388
}
389389

390390
declare module 'lodash/shuffle' {
391-
declare function exports(collection: Iterable): any[];
391+
declare function exports(collection: IterableCollection): any[];
392392
}
393393

394394
declare module 'lodash/size' {
395-
declare function exports(collection: Iterable): number;
395+
declare function exports(collection: IterableCollection): number;
396396
}
397397

398398
declare module 'lodash/some' {
399-
declare function exports(collection: Iterable, iteratee?: Iteratee): boolean;
399+
declare function exports(collection: IterableCollection, iteratee?: Iteratee): boolean;
400400
}
401401

402402
declare module 'lodash/sortBy' {
403-
declare function exports(collection: Iterable, iteratees?: Iteratee[]): any[];
403+
declare function exports(collection: IterableCollection, iteratees?: Iteratee[]): any[];
404404
}
405405

406406
// Date
@@ -836,11 +836,11 @@ declare module 'lodash/defaultsDeep' {
836836
}
837837

838838
declare module 'lodash/entries' {
839-
declare function exports(collection: Iterable): any[];
839+
declare function exports(collection: IterableCollection): any[];
840840
}
841841

842842
declare module 'lodash/entriesIn' {
843-
declare function exports(collection: Iterable): any[];
843+
declare function exports(collection: IterableCollection): any[];
844844
}
845845

846846
declare module 'lodash/extend' {
@@ -908,11 +908,11 @@ declare module 'lodash/invoke' {
908908
}
909909

910910
declare module 'lodash/keys' {
911-
declare function exports(collection: Iterable): Array<number | string>;
911+
declare function exports(collection: IterableCollection): Array<number | string>;
912912
}
913913

914914
declare module 'lodash/keysIn' {
915-
declare function exports(collection: Iterable): Array<number | string>;
915+
declare function exports(collection: IterableCollection): Array<number | string>;
916916
}
917917

918918
declare module 'lodash/mapKeys' {
@@ -968,7 +968,7 @@ declare module 'lodash/toPairsIn' {
968968
}
969969

970970
declare module 'lodash/transform' {
971-
declare function exports(collection: Iterable, iteratee?: TransformCallback, accumulator?: any): any;
971+
declare function exports(collection: IterableCollection, iteratee?: TransformCallback, accumulator?: any): any;
972972
}
973973

974974
declare module 'lodash/unset' {

0 commit comments

Comments
 (0)