import {A} from 'ts-toolbelt'
type test0 = A.Extends<'a' | 'b', 'b'> // Boolean
type test1 = A.Extends<'a', 'a' | 'b'> // True
type test2 = A.Extends<{a: string}, {a: any}> // True
type test3 = A.Extends<{a: any}, {a: any, b: any}> // False
type test4 = A.Extends<never, never> // False
/// Nothing cannot extend nothing, use `A.Equals`
Check whether
A1
is part ofA2
or not. The difference withextends
is that it forces a Boolean return.