UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

22 lines 549 B
//#region src/array/dropLast.d.ts /** * `dropLast(target, amount)` * * Removes `amount` of elements from the end of the `target` array. * * ```ts * dropLast([1, 2, 3, 4, 5], 2); // [1, 2, 3] * ``` * * ```ts * pipe([1, 2, 3, 4, 5], dropLast(2)); // [1, 2, 3] * ``` */ declare const dropLast: { (amount: number): <T>(target: T[]) => T[]; (amount: number): <T>(target: readonly T[]) => readonly T[]; <T>(target: T[], amount: number): T[]; <T>(target: readonly T[], amount: number): readonly T[]; }; //#endregion export { dropLast };