UNPKG

reactronic

Version:

Reactronic - Transactional Reactive State Management

38 lines (37 loc) 1.32 kB
import { LoggingOptions } from "./Logging.js"; export { LoggingLevel } from "./Logging.js"; import { Kind, Reentrance, Isolation } from "./Enums.js"; export type { LoggingOptions, ProfilingOptions } from "./Logging.js"; import { Journal } from "./core/Journal.js"; import { Indicator } from "./core/Indicator.js"; export type SnapshotOptions = { readonly hint?: string; readonly isolation?: Isolation; readonly journal?: Journal; readonly logging?: Partial<LoggingOptions>; readonly token?: any; }; export type ReactivityOptions = { readonly kind: Kind; readonly isolation: Isolation; readonly order: number; readonly noSideEffects: boolean; readonly signalArgs: boolean; readonly throttling: number; readonly reentrance: Reentrance; readonly allowObsoleteToFinish: boolean; readonly journal: Journal | undefined; readonly indicator: Indicator | null; readonly logging?: Partial<LoggingOptions>; }; export type Reaction<T> = { readonly options: ReactivityOptions; readonly args: ReadonlyArray<any>; readonly result: T; readonly error: any; readonly stamp: number; readonly isReusable: boolean; configure(options: Partial<ReactivityOptions>): ReactivityOptions; markObsolete(): void; pullLastResult(args?: any[]): any; };