UNPKG

@arrows/array

Version:
17 lines (16 loc) 511 B
declare type _Concat = <T>(value: T | T[], arr: T[]) => T[]; declare type _Concat2 = <T>(value: T | T[]) => (arr: T[]) => T[]; declare type Concat = _Concat & _Concat2; /** * Functional wrapper for Array.prototype.concat * * Combines two arrays. * If the concatenated value is not an array, adds it as a last element. * * @param value An array or single value to be concatenated * @param arr Initial array * @returns New array */ declare const concat: Concat; export { concat }; export default concat;