UNPKG

@breeffy/invariants

Version:
13 lines 1.15 kB
/** * @param condition If it's `falsy` - exception will be thrown, otherwise TypeScript asserts condition. See [Assertion Functions](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#assertion-functions). * @param message Error message to use if exception will be thrown. Default is `""`. * @param prefix Prefix string to use before error message if exception will be thrown. Default is `"[assert] "`. */ export declare function assert(condition: any, message?: string, prefix?: string | undefined): asserts condition; /** * @param condition If it's `falsy` - exception will be thrown, otherwise TypeScript asserts condition. See [Assertion Functions](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#assertion-functions). * @param message Error message to use if exception will be thrown. Default is `""`. * @param prefix Prefix string to use before error message if exception will be thrown. Default is `"[invariant] "`. */ export declare function invariant(condition: any, message?: string, prefix?: string | undefined): asserts condition; //# sourceMappingURL=invariants.d.ts.map