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.
🎭 validate
Validate if
T
is not a template literal(s).