import { Tuple } from '../../primitive'; import { Push } from '../Push'; /** * Remove specific elements from an array type * 배열에서 특정 요소를 제거하는 타입 * * A type that removes elements that match a specific type from an array * 배열에서 특정 요소와 일치하는 요소를 제거하는 타입 * * @param T The original array type / 원본 배열 * @param F The type to remove / 제거할 요소 * @returns Array with specified elements removed / 특정 요소가 제거된 배열 * * @example * type cases = [ * Expect, [1, 3, 4, 5]>>, * Expect, [1, 2, 3, 4, 5]>>, * Expect, []>>, * Expect, [1]>>, * ]; */ export type Remove = T extends [ infer First, ...infer Rest ] ? [First] extends [F] ? Remove : Remove> : R;