@monstermann/fn
Version:
A utility library for TypeScript.
22 lines • 509 B
TypeScript
//#region src/array/drop.d.ts
/**
* `drop(array, amount)`
*
* Removes the first `amount` elements from `array`.
*
* ```ts
* drop([1, 2, 3, 4, 5], 2); // [3, 4, 5]
* ```
*
* ```ts
* pipe([1, 2, 3, 4, 5], drop(2)); // [3, 4, 5]
* ```
*/
declare const drop: {
(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 { drop };