UNPKG

reactronic

Version:

Reactronic - Transactional Reactive State Management

64 lines (63 loc) 3.44 kB
import { F } from "../util/Utils.js"; import { Kind, Reentrance, Isolation } from "../Enums.js"; import { ReactivityOptions } 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(isSignal: boolean); [Symbol.toStringTag](): string; } export declare abstract class TxObject extends MvccObject { constructor(); } export declare abstract class SxObject extends MvccObject { constructor(); } export declare class OptionsImpl implements ReactivityOptions { readonly getter: Function; readonly setter: Function; 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>; 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 tx: Mvcc; static readonly sx: Mvcc; readonly isSignal: boolean; constructor(isSignal: 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(isSignal: boolean, proto: any, fk: FieldKey): any; static decorateOperation(implicit: boolean, decorator: Function, options: Partial<ReactivityOptions>, proto: any, member: FieldKey, pd: PropertyDescriptor | undefined): any; static decorateOperationParametrized(decorator: Function, options: Partial<ReactivityOptions>): F<any>; static acquireHandle(obj: any): ObjectHandle; static createHandleForMvccObject(proto: any, data: any, blank: any, hint: string, isSignal: 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 createOperationDescriptor: (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<ReactivityOptions>, implicit: boolean) => OptionsImpl; }