@antithesishq/ bombadil #
Exports #
Always #
class Always extends Formula {
boundMillis: number | null;
subformula: Formula;
constructor(boundMillis: number | null, subformula: Formula);
within(n: number, unit: TimeUnit): Formula;
toString(): string;
}And #
class And extends Formula {
left: Formula;
right: Formula;
constructor(left: Formula, right: Formula);
toString(): string;
}CustomAction #
Identifies a custom action and provides it with its arguments. This base action might not be supported by all drivers.
type CustomAction<Args> = {
Custom: {
name: string;
args: Args;
};
}Eventually #
class Eventually extends Formula {
boundMillis: number | null;
subformula: Formula;
constructor(boundMillis: number | null, subformula: Formula);
within(n: number, unit: TimeUnit): Formula;
toString(): string;
}Formula #
class Formula {
not(): Formula;
and(that: IntoFormula): Formula;
or(that: IntoFormula): Formula;
implies(that: IntoFormula): Formula;
}Implies #
class Implies extends Formula {
left: Formula;
right: Formula;
constructor(left: Formula, right: Formula);
toString(): string;
}Next #
class Next extends Formula {
subformula: Formula;
constructor(subformula: Formula);
toString(): string;
}Not #
class Not extends Formula {
subformula: Formula;
constructor(subformula: Formula);
toString(): string;
}Or #
class Or extends Formula {
left: Formula;
right: Formula;
constructor(left: Formula, right: Formula);
}Pure #
class Pure extends Formula {
private pretty;
value: boolean;
constructor(pretty: string, value: boolean);
toString(): string;
}Thunk #
class Thunk extends Formula {
private pretty;
apply: () => Formula;
constructor(pretty: string, apply: () => Formula);
toString(): string;
}actions #
function actions<A>(generate: () => Tree<A> | A[]): ActionGenerator<A>;always #
function always(x: IntoFormula): Always;eventually #
function eventually(x: IntoFormula): Eventually;extract #
function extract<
S,
T extends JSON
>(query: (state: S) => T): ExtractorCell<T, S>;next #
function next(x: IntoFormula): Formula;not #
function not(value: IntoFormula): Not;now #
function now(x: IntoFormula): Formula;registerCustomAction #
Register a new custom action, returning a function used to create action templates in generators. Name must be unique. Prefer using the export from the driver module, which has more a specific type.
function registerCustomAction<Args extends JSON[]>(name: string, handler: (...args: Args) => Promise<void>): (...args: Args) => CustomAction<Args>;weighted #
function weighted<A>(value: [number, A | ActionGenerator<A>][]): ActionGenerator<A>;Reexports #
export { Cell, JSON } from "@antithesishq/bombadil/internal";export { ActionGenerator, Tree } from "@antithesishq/bombadil/actions";