UNPKG

typedash

Version:

modern, type-safe collection of utility functions

16 lines 744 B
//#region src/functions/without/without.d.ts /** * Returns a new array containing all elements of the input array except the specified items to exclude. * @param array The input array to exclude items from. * @param itemsToExclude An iterable of items to exclude from the input array. * @returns A new array containing all elements of the input array except the specified items to exclude. * @example * ```ts * without([1, 2, 3], [2, 3]) // [1] * without(['a', 'b', 'c'], ['b', 'c']) // ['a'] * without([1, 2, 3], []) // [1, 2, 3] */ declare function without<T, const S extends T>(array: readonly T[], itemsToExclude: Iterable<S>): Exclude<T, S>[]; //#endregion export { without as t }; //# sourceMappingURL=without-ChXK9q1h.d.cts.map