Skip to content

Latest commit

 

History

History
57 lines (40 loc) · 726 Bytes

File metadata and controls

57 lines (40 loc) · 726 Bytes

typelab / assertions / IsNotExtends

type IsNotExtends<T1, T2> = _IsTrue<IfNotExtends<T1, T2, true, false>>;

Type that checks if type T1 not extends type T2.

`IsExtends` in reverse.

Type Parameters

Type Parameter Description

T1

The first type to compare.

T2

The second type to compare.

Returns

true if T1 is not assignable to T2, false otherwise.

Example

type NotExtends = IsNotExtends<string, ''>; // true
type Extends = IsNotExtends<'', string>; // false