@warp-drive/build-config
Version:
Provides Build Configuration for projects using WarpDrive
19 lines (18 loc) • 590 B
TypeScript
/**
* Internal functions for instrumenting the library's code with behaviors
* that are removed from production builds.
*
* @hidden
* @module
*/
/**
* A type-narrowing assertion function that throws an error with the supplied
* message if the condition is falsy.
*
* Asserts are removed from production builds, making this a "zero cost abstraction"
* so liberal usage of this function to ensure runtime correctness is encouraged.
*
* @private
*/
export declare function assert(message: string, condition: unknown): asserts condition;
export declare function assert(message: string): never;