@firfi/quint-connect
Version:
Model-based testing framework connecting Quint specifications to TypeScript implementations
23 lines • 1.18 kB
TypeScript
import { Effect } from "effect";
import type { StateComparator } from "../driver/types.js";
import type { ReplayStep } from "./replay-actions.js";
import type { ReplayActionContext, StateMismatchError } from "./replay-errors.js";
import { TraceReplayError } from "./replay-errors.js";
export interface StateCheck<S, E = never, R = never> {
readonly compareState: StateComparator<S>;
readonly deserializeState: (raw: unknown) => Effect.Effect<S, E, R>;
}
interface StateReadableDriver<S, E, R> {
readonly getState?: () => Effect.Effect<S, E, R>;
}
interface CheckReplayStateOptions<S, DriverE, DriverR, StateE, StateR> {
readonly step: ReplayStep;
readonly driver: StateReadableDriver<S, DriverE, DriverR>;
readonly stateCheck: StateCheck<S, StateE, StateR>;
readonly context: ReplayActionContext;
readonly seed: string;
}
/** @internal */
export declare const checkReplayState: <S, DriverE, DriverR, StateE = never, StateR = never>(opts: CheckReplayStateOptions<S, DriverE, DriverR, StateE, StateR>) => Effect.Effect<void, DriverE | StateMismatchError | TraceReplayError, DriverR | StateR>;
export {};
//# sourceMappingURL=state-check.d.ts.map