UNPKG

offensive

Version:

Fast and boilerplate-free precondition checks for javascript.

25 lines (24 loc) 769 B
import { AssertionBuilder, RuntimeBuilder } from './Builder'; export interface BuilderConstructor { new (varName: string, testedValue: any, stackTrace: string): RuntimeBuilder; prototype: any; } export interface InnerConstructor { new (varName: string, testedValue: any): RuntimeBuilder; prototype: any; } /** * Beware! Here be dragons. * * @author Maciej Chałapuk (maciej@chalapuk.pl) */ export declare class BuilderFactory { private readonly assertions; private readonly operators; private readonly Constructor; private readonly InnerConstructor; constructor(assertions: object, operators: object); create<T>(varName: string, testedValue: T): AssertionBuilder<T>; private createInner; } export default BuilderFactory;