type List = ArrayLike; type PartialDeep = { [P in keyof T]?: PartialDeep; }; interface Dictionary { [index: string]: T; } interface NumericDictionary { [index: number]: T; } type NotVoid = {} | null | undefined; type ListIteratee = ListIterator | string | [string, any] | PartialDeep; type ListIterator = (value: T, index: number, collection: List) => TResult; type ListIterateeCustom = ListIterator | string | [string, any] | PartialDeep; type ObjectIterator = (value: TObject[keyof TObject], key: string, collection: TObject) => TResult; type Many = T | T[]; interface FlatMap { ( collection: List> | Dictionary> | NumericDictionary> | null | undefined ): T[]; ( collection: object | null | undefined ): any[]; ( collection: List | null | undefined, iteratee: ListIterator> ): TResult[]; ( collection: T | null | undefined, iteratee: ObjectIterator> ): TResult[]; ( collection: object | null | undefined, iteratee: string ): any[]; ( collection: object | null | undefined, iteratee: object ): boolean[]; } type PropertyName = string | number | symbol; type IterateeShorthand = PropertyName | [PropertyName, any] | PartialDeep; type ValueIteratee = ((value: T) => NotVoid) | IterateeShorthand; export const noop: () => void = require('lodash/noop'); export const forOwn = require('lodash/forOwn'); export const escapeRegExp: (string?: string) => string = require('lodash/escapeRegExp'); export const escape: (string?: string) => string = require('lodash/escape'); export const sample = require('lodash/sample'); export const findLastIndex: (array: List | null | undefined, predicate?: ListIterateeCustom, fromIndex?: number) => number = require('lodash/findLastIndex'); export const times: (n: number, iteratee: (num: number) => TResult) => TResult[] = require('lodash/times'); export const isNumber: (value?: any) => value is number = require('lodash/isNumber'); export const isString: (value?: any) => value is string = require('lodash/isString'); export const isBoolean: (value?: any) => value is boolean = require('lodash/isBoolean'); export const isFunction: (value?: any) => value is (...args: any[]) => any = require('lodash/isFunction'); export const clamp: (number: number, lower: number, upper: number) => number = require('lodash/clamp'); export const merge: (object: TObject, source: TSource) => TObject & TSource = require('lodash/merge'); export const mapValues: (obj: T | null | undefined, callback: ObjectIterator) => { [P in keyof T]: TResult } = require('lodash/mapValues'); export const zip: (...arrays: (List | null | undefined)[]) => (T | undefined)[][] = require('lodash/zip'); export const assignWith = require('lodash/assignWith'); export const isMatchWith = require('lodash/isMatchWith'); export const once: any>(func: T) => T = require('lodash/once'); export const range: (start: number, end?: number, step?: number) => number[] = require('lodash/range'); export const flatten: (array: List> | null | undefined) => T[] = require('lodash/flatten'); export const sum = require('lodash/sum'); export const remove: (array: List, predicate?: ListIteratee) => T[] = require('lodash/remove'); export const debounce = require('lodash/debounce'); export const dropRight: (array: List | null | undefined, n?: number) => T[] = require('lodash/dropRight'); export const padStart: (string?: string, length?: number, chars?: string) => string = require('lodash/padStart'); export const fill = require('lodash/fill'); export const includes = require('lodash/includes'); export const random = require('lodash/random'); export const max: (collection: List | null | undefined) => T | undefined = require('lodash/max'); export const uniqueId = require('lodash/uniqueId'); export const startsWith: (string?: string, target?: string, position?: number) => boolean = require('lodash/startsWith'); export const repeat: (string?: string, n?: number) => string = require('lodash/repeat'); export const uniq: (array: List | null | undefined) => T[] = require('lodash/uniq'); export const flatMap: FlatMap = require('lodash/flatMap'); export const without: (array: List | null | undefined, ...values: T[]) => T[] = require('lodash/without'); export const compact: (array: List | null | undefined) => T[] = require('lodash/compact'); export const isEqual = require('lodash/isEqual'); export const dropRightWhile: (array: List | null | undefined, predicate?: ListIteratee) => T[] = require('lodash/dropRightWhile'); export const fromPairs = require('lodash/fromPairs'); export const camelCase = require('lodash/camelCase'); export const truncate = require('lodash/truncate'); export const findIndex = require('lodash/findIndex'); export const last = require('lodash/last'); export const toPairs: (object?: Dictionary | NumericDictionary) => [string, T][] = require('lodash/toPairs'); export const groupBy: (collection: List | null | undefined, iteratee?: ValueIteratee) => Dictionary = require('lodash/groupBy');