ts-scikit
Version:
A scientific toolkit written in Typescript
24 lines (23 loc) • 913 B
TypeScript
export declare class Check {
/**
* Ensures that the specified condition for an argument is true.
* @param condition the condition.
* @param message a description of the condition.
* @throws IllegalArgumentError if the condition is false.
*/
static argument(condition: boolean, message: string): void;
/**
* Ensures that the specified condition of state is true.
* @param condition the condition.
* @param message a description of the condition.
* @throws IllegalStateError if the condition is false.
*/
static state(condition: boolean, message: string): void;
/**
* Ensures that the specified zero-based index is in bounds.
* @param n the smallest positive number that is not in bounds.
* @param i the index.
* @throws IndexOutOfBoundsError if index is out of bounds
*/
static index(n: number, i: number): void;
}