Make an assertion that actual is not null or undefined. If not then throw.
The type of the actual value.
The actual value to check.
Optional
The optional message to include in the error if the assertion fails.
import { assertExists } from "@std/assert";assertExists("something"); // Doesn't throwassertExists(undefined); // Throws Copy
import { assertExists } from "@std/assert";assertExists("something"); // Doesn't throwassertExists(undefined); // Throws
Make an assertion that actual is not null or undefined. If not then throw.