declare global { interface Array { first(this: T[]): T | undefined; last(this: T[]): T | undefined; elementAt(this: T[], index: number): T | undefined; distinct(this: T[]): T[]; distinctBy(this: T[], property: (item: T) => TKey): T[]; contains(this: T[], item: T): boolean; orderBy(this: T[], ...properties: ((item: T) => any)[]): T[]; orderByDesc(this: T[], property: (item: T) => any): T[]; move(this: T[], from: number, to: number): T[]; groupBy(this: T[], property: (item: T) => TKey): Group[]; } } export declare function first(this: T[]): T | undefined; export declare function last(this: T[]): T | undefined; export declare function elementAt(this: T[], index: number): T | undefined; /** * Removes duplicates from a collection based on a Set * * @param this Array * @returns Array */ export declare function distinct(this: T[]): T[]; /** * Removes duplicates from a collection based on a Set * * @param this Array * @returns Array */ export declare function distinctBy(this: T[], property: (item: T) => TKey): T[]; export declare function contains(this: T[], item: T): boolean; export declare function flatten(array: T[], nestedArrayFunc: (item: T) => T[]): T[]; /** * Sorts array by specified properties based on "lodashOrderBy" function * * @param this Array * @param properties List of property selectors * @returns Sorted array */ export declare function orderBy(this: T[], ...properties: ((item: T) => any)[]): T[]; export declare function orderByDesc(this: T[], property: (item: T) => any): T[]; export declare function move(this: T[], from: number, to: number): T[]; export declare function groupBy(this: T[], property: (item: T) => TKey): Group[];