reakit-utils
Version:
Reakit utils
12 lines (11 loc) • 350 B
TypeScript
/**
* Immutably removes an index from an array.
*
* @example
* import { removeIndexFromArray } from "reakit-utils";
*
* removeIndexFromArray(["a", "b", "c"], 1); // ["a", "c"]
*
* @returns {Array} A new array without the item in the passed index.
*/
export declare function removeIndexFromArray<T extends any[]>(array: T, index: number): T;