reactronic
Version:
Reactronic - Transactional Reactive State Management
63 lines (62 loc) • 3.44 kB
TypeScript
import { F } from "../util/Utils.js";
import { MemberOptions, Kind, Reentrance, Isolation } from "../Options.js";
import { LoggingOptions, ProfilingOptions } from "../Logging.js";
import { FieldKey, ObjectHandle } from "./Data.js";
import { Journal } from "./Journal.js";
import { Indicator } from "./Indicator.js";
export declare abstract class MvccObject {
protected constructor(isTriggering: boolean);
[Symbol.toStringTag](): string;
}
export declare abstract class TransactionalObject extends MvccObject {
constructor();
}
export declare abstract class TriggeringObject extends MvccObject {
constructor();
}
export declare class OptionsImpl implements MemberOptions {
readonly getter: Function;
readonly setter: Function;
readonly kind: Kind;
readonly isolation: Isolation;
readonly order: number;
readonly noSideEffects: boolean;
readonly triggeringArgs: boolean;
readonly throttling: number;
readonly reentrance: Reentrance;
readonly allowObsoleteToFinish: boolean;
readonly journal: Journal | undefined;
readonly indicator: Indicator | null;
readonly logging?: Partial<LoggingOptions>;
static readonly INITIAL: Readonly<OptionsImpl>;
constructor(getter: Function | undefined, setter: Function | undefined, existing: OptionsImpl, patch: Partial<OptionsImpl>, implicit: boolean);
}
export declare class Mvcc implements ProxyHandler<ObjectHandle> {
static reactivityAutoStartDisabled: boolean;
static repetitiveUsageWarningThreshold: number;
static mainThreadBlockingWarningThreshold: number;
static asyncActionDurationWarningThreshold: number;
static sensitivity: boolean;
static readonly transactional: Mvcc;
static readonly triggering: Mvcc;
readonly isTriggering: boolean;
constructor(isTriggering: boolean);
getPrototypeOf(h: ObjectHandle): object | null;
get(h: ObjectHandle, fk: FieldKey, receiver: any): any;
set(h: ObjectHandle, fk: FieldKey, value: any, receiver: any): boolean;
has(h: ObjectHandle, fk: FieldKey): boolean;
defineProperty?(h: ObjectHandle, name: string | symbol, attributes: PropertyDescriptor): boolean;
getOwnPropertyDescriptor(h: ObjectHandle, fk: FieldKey): PropertyDescriptor | undefined;
ownKeys(h: ObjectHandle): Array<string | symbol>;
static decorateData(isTrigger: boolean, proto: any, fk: FieldKey): any;
static decorateOperation(implicit: boolean, decorator: Function, options: Partial<MemberOptions>, proto: any, member: FieldKey, pd: PropertyDescriptor | undefined): any;
static decorateOperationParametrized(decorator: Function, options: Partial<MemberOptions>): F<any>;
static acquireHandle(obj: any): ObjectHandle;
static createHandleForMvccObject(proto: any, data: any, blank: any, hint: string, isTriggering: boolean): ObjectHandle;
static setProfilingMode(isOn: boolean, options?: Partial<ProfilingOptions>): void;
static sensitive<T>(sensitivity: boolean, func: F<T>, ...args: any[]): T;
static setHint<T>(obj: T, hint: string | undefined): T;
static getHint<T>(obj: T): string;
static createOperation: (h: ObjectHandle, fk: FieldKey, options: OptionsImpl) => F<any>;
static rememberOperationOptions: (proto: any, fk: FieldKey, getter: Function | undefined, setter: Function | undefined, enumerable: boolean, configurable: boolean, options: Partial<MemberOptions>, implicit: boolean) => OptionsImpl;
}