Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/rimbu/typical/mod.ts>U.NotExtends

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
type alias U.NotExtends
import { type U } from "https://deno.land/x/rimbu@1.0.2/typical/mod.ts";
const { NotExtends } = U;

If A does not extend B, returns Then (default true) or else Else (default false)

Examples

Example 1

NotExtends<1, number> => false
NotExtends<1, string> => true
NotExtends<1, number, 'a', 'b'> => 'b'
NotExtends<1, string, 'a', 'b'> => 'a'

Type Parameters

A
B
optional
Then = true
optional
Else = false
definition: A extends B ? Else : Then