UNPKG

dtk-z3-solver-deno-v2

Version:

This directory contains JavaScript code to automatically derive TypeScript bindings for the C API, which are published on npm as [z3-solver](https://www.npmjs.com/package/z3-solver).

31 lines (30 loc) 878 B
/** * Use to ensure that switches are checked to be exhaustive at compile time * * @example Basic usage * ```typescript * enum Something { * left, * right, * }; * const something = getSomething(); * switch (something) { * case Something.left: * ... * case Something.right: * ... * default: * assertExhaustive(something); * } * ``` * * @param x - The param on which the switch operates */ export declare function assertExhaustive(x: never): never; export declare function assert(condition: boolean, reason?: string): asserts condition; /** * Check the all elements of a `collection` satisfy the `premise`. * If any of the items fail the `premise`, returns false; * @returns null if the `collection` is empty, boolean otherwise */ export declare function allSatisfy<T>(collection: Iterable<T>, premise: (arg: T) => boolean): boolean | null;