Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function assertType
import { assertType } from "https://deno.land/std@0.159.0/_util/assert_type.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.