UNPKG

@n1k1t/mock-server

Version:

Powerful util to setup mocks over HTTP APIs

17 lines 1.08 kB
import { ExpectationOperator } from '../models/operator'; import { IExpectationSchemaContext, IExpectationOperatorsSchema, TExpectationMetaTag, TExpectationOperatorLocation } 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(): TExpectationMetaTag[]; match(context: TContext): boolean; manipulate<T extends TContext>(context: T): T; } //# sourceMappingURL=if.operator.d.ts.map