Type Alias IsNotTemplateLiteral<T, $O>

IsNotTemplateLiteral<T, $O>: $SpecialType<T, $MergeOptions<$O, {
    $else: IsNotTemplateLiteral.$<T, $O>;
    $then: $ResolveBranch<T, $O, [$Then]>;
}>>

🎭 validate

Validate if T is not a template literal(s).

Type Parameters

type R = IsNotTemplateLiteral<string> // true
type R = IsNotTemplateLiteral<'foo'> // true
type R = IsNotTemplateLiteral<`a${number}`> // false

type R = IsNotTemplateLiteral<never> // true
type R = IsNotTemplateLiteral<unknown> // true
type R = IsNotTemplateLiteral<`${number}` | boolean> // boolean

🔢 customize

Filter to ensure T is not a template literal(s), otherwise returns never.

type R = IsNotTemplateLiteral<`${number}`, { selection: 'filter' }> // never
type R = IsNotTemplateLiteral<'a', { selection: 'filter' }> // 'a'

🔢 customize:

Disable distribution of union types.

type R = IsNotTemplateLiteral<`${number}` | 1> // boolean
type R = IsNotTemplateLiteral<`${number}` | 1, { distributive: false }> // true

🔢 customize

Use unique branch identifiers to allow precise processing of the result.

type R = IsNotTemplateLiteral<`${number}`, $IsNotTemplateLiteral.$Branch> // $Else
type R = IsNotTemplateLiteral<bigint, $IsString.$Branch> // $Then