Skip to main content


The Deno Standard Library
Go to Latest
type alias AssertTrue
import { type AssertTrue } from "";

Asserts at compile time that the provided type argument's type resolves to true.


Example 1

import { AssertTrue, Has, IsNullable } from "";

const result = 1 as string | number | null;

type doTest = AssertTrue<Has<typeof result, string> | IsNullable<typeof result>>;

Type Parameters

T extends true
definition: never