Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 696 Bytes

File metadata and controls

55 lines (39 loc) · 696 Bytes

typelab / assertions / IsNotIntersected

type IsNotIntersected<T1, T2> = IfNotIntersected<T1, T2, true, false>;

Checks if type T1 is not intersected with type T2.

Type Parameters

Type Parameter Description

T1

The first type to compare.

T2

The second type to compare.

Returns

true if T1 & T2 is never, false otherwise.

Example

type Intersected = IsIntersected<'a' | 'c', 'a' | 'b'>; // true
type NotIntersected = IsIntersected<'c', 'a' | 'b'>; // false