Package: effect
Module: Tuple
Creates a new tuple with the elements at the specified indices removed.
When to use
Use to drop elements from a tuple by position.
Details
Elements not at the specified indices are kept in their original order.
Example (Removing elements by index)
import { Tuple } from "effect"
const result = Tuple.omit(["a", "b", "c", "d"], [1, 3])
console.log(result) // ["a", "c"]
See
pick – the inverse (keep only specified indices)Signature
declare const omit: { <const T extends ReadonlyArray<unknown>, const I extends ReadonlyArray<Indices<T>>>(indices: I): (self: T) => OmitTuple<T, I[number]>; <const T extends ReadonlyArray<unknown>, const I extends ReadonlyArray<Indices<T>>>(self: T, indices: I): OmitTuple<T, I[number]>; }
Since v4.0.0