Type Alias TSetIntersect<T, S, Acc>

TSetIntersect<T, S, Acc>: T extends [infer L extends PropertyKey, ...(infer R extends PropertyKey[])]
    ? TSetIncludes<S, L> extends true
        ? TSetIntersect<R, S, [...Acc, L]>
        : TSetIntersect<R, S, [...Acc]>
    : Acc

Type Parameters

  • T extends PropertyKey[]
  • S extends PropertyKey[]
  • Acc extends PropertyKey[] = []