UNPKG

@n1k1t/mock-server

Version:

The ultimate toolkit to intercept, transform, and simulate HTTP/WS traffic with type-safe expectations

17 lines 1.1 kB
import { ExpectationOperator } from '../models/operator'; import { IExpectationSchemaContext, IExpectationOperatorsSchema, TExpectationOperatorLocation, IExpectationMeta } from '../types'; export default class IfExpectationOperator<TContext extends IExpectationSchemaContext, TLocation extends TExpectationOperatorLocation = TExpectationOperatorLocation, TValue = void> extends ExpectationOperator<TContext, { $condition: Pick<IExpectationOperatorsSchema<TContext, TLocation, TValue>, '$and' | '$exec' | '$has' | '$or' | '$not'>; $then?: IExpectationOperatorsSchema<TContext, TLocation, TValue>; $else?: IExpectationOperatorsSchema<TContext, TLocation, TValue>; }> { compiled: { else?: ExpectationOperator<TContext, any> | null | undefined; then?: ExpectationOperator<TContext, any> | null | undefined; condition: ExpectationOperator<TContext, any> | null; }; get tags(): IExpectationMeta['tags']; match(context: TContext): Promise<boolean>; manipulate<T extends TContext>(context: T): Promise<T>; } //# sourceMappingURL=if.operator.d.ts.map