Asserts at compile time that the provided type argument's type resolves to true.
The type to assert is true.
import { AssertTrue, Has, IsNullable } from "@std/testing/types";const result = 1 as string | number | null;type doTest = AssertTrue<Has<typeof result, string> | IsNullable<typeof result>>; Copy
import { AssertTrue, Has, IsNullable } from "@std/testing/types";const result = 1 as string | number | null;type doTest = AssertTrue<Has<typeof result, string> | IsNullable<typeof result>>;
Asserts at compile time that the provided type argument's type resolves to true.