Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 721 Bytes

File metadata and controls

55 lines (39 loc) · 721 Bytes

typelab / assertions / IsExtendsMutually

type IsExtendsMutually<T1, T2> = _IsTrue<IfExtendsMutually<T1, T2, true, false>>;

Type that checks if type T1 extends type T2 and type T2 extends type T1.

Type Parameters

Type Parameter Description

T1

The first type to compare.

T2

The second type to compare.

Returns

true if both conditions are true, false otherwise.

Example

type Mutual = IsExtendsMutually<string, any>; // true
type NotMutual = IsExtendsMutually<string, ''>; // false