Skip to main content
The Deno 2 Release Candidate is here
Learn more
function assert
import { assert } from "https://deno.land/x/conditional_type_checks@1.0.5/mod.ts";

Asserts at compile time that the provided type argument's type resolves to the expected boolean literal type.

Type Parameters

T extends true | false

Parameters

expectTrue: T
  • True if the passed in type argument resolved to true.