_UniqueFromSet type

Utility type to recursively evaluate if Type is within Set.

export declare type _UniqueFromSet<Set extends unknown[], Current extends unknown[], CurrentValue, Type> = _UniqueCondition<Type, CurrentValue> extends true ? CurrentValue : _ContinueRecursivelyExtractFromSet<Set, [CurrentValue, ...Current], Type>;

Remarks

Current is used to track the recursion, which is why CurrentValue is added to Current after _UniqueCondition is evaluated.