import type { Stack } from './methods/debugger.js'; type IContext = import('./objects/context.js').default; type IEffect = import('./objects/effect.js').default; type IMemo = import('./objects/memo.js').default; type IObservable = import('./objects/observable.js').default; type IObserver = import('./objects/observer.js').default; type IOwner = import('./objects/owner.js').default; type IRoot = import('./objects/root.js').default; type ISchedulerAsync = typeof import('./objects/scheduler.async.js').default; type ISchedulerSync = typeof import('./objects/scheduler.sync.js').default; type ISuperRoot = import('./objects/superroot.js').default; type ISuspense = import('./objects/suspense.js').default; type BatchFunction = () => PromiseMaybe; type CallbackFunction = (stack?: Stack) => void; type CleanupFunction = (stack?: Stack) => void; type ContextFunction = (stack?: Stack) => T; type DisposeFunction = (stack?: Stack) => void; type EffectFunction = (stack?: Stack) => CleanupFunction | void; type ErrorFunction = (error: Error) => void; type EqualsFunction = (value: T, valuePrev: T) => boolean; type MapFunction = (value: T, index: FunctionMaybe) => R; type MapValueFunction = (value: Indexed, index: FunctionMaybe) => R; type MemoFunction = (stack?: Stack) => T; type ObserverFunction = (stack?: Stack) => T; type SelectorFunction = (value: T) => ObservableReadonly; type SuspenseFunction = (stack?: Stack) => T; type TryCatchFunction = ({ error, reset }: { error: Error; reset: DisposeFunction; }) => T; type UntrackFunction = () => T; type UntrackedFunction = (...args: Arguments) => T; type UpdateFunction = (value: T) => T; type WithFunction = (stack?: Stack) => T; type WrappedFunction = (stack?: Stack) => T; type WrappedDisposableFunction = (stack?: Stack, dispose?: DisposeFunction) => T; type EffectOptions = { suspense?: boolean; sync?: boolean | 'init'; stack?: Stack; }; type ForOptions = { pooled?: boolean; unkeyed?: boolean; }; type MemoOptions = { equals?: EqualsFunction | false; sync?: boolean; stack?: Stack; }; type Observable = { (): T; (fn: (value: T) => T): T; (value: T): T; readonly [ObservableSymbol]: true; }; type ObservableLike = { (): T; (fn: (value: T) => T): T; (value: T): T; }; type ObservableReadonly = { (): T; readonly [ObservableSymbol]: true; }; type ObservableReadonlyLike = { (): T; }; /** * ObservableOptions type definition */ type ObservableOptions = { equals?: EqualsFunction | false; type?: 'string' | 'function' | 'object' | 'number' | 'boolean' | 'symbol' | 'undefined' | 'bigint' | String | Function | Object | Number | Boolean | Symbol | BigInt | Constructor | T; /** * Function to convert the observable value to a string representation for HTML attributes. * This is useful when binding observables to DOM element attributes. */ toHtml?: (t: T) => string; /** * Function to convert a string value from HTML attributes back to the observable's type. * This is useful when binding HTML attributes back to observables. */ fromHtml?: (s: string) => T; }; declare const ObservableSymbol: unique symbol; type Owner = { isSuperRoot: boolean; isRoot: boolean; isSuspense: boolean; isComputation: boolean; }; type StoreOptions = { equals?: EqualsFunction | false; }; type ArrayMaybe = T | T[]; type Callable = (T & { call: CallableFunctionCall; }) | ({ call: CallableFunctionCall; apply?: never; }); type CallableFunction = (...args: any[]) => any; type CallableFunctionCall = (thiz: any, ...args: Parameters) => ReturnType; type Constructor = { new (...args: Arguments): T; }; type Contexts = Record; type FunctionMaybe = (() => T) | T; type Indexed = T extends ObservableReadonly ? ObservableReadonly : ObservableReadonly; type LazyArray = T[] | T | undefined; type LazySet = Set | T | undefined; type LazyValue = T | undefined; type PromiseMaybe = T | Promise; type ResolvablePrimitive = null | undefined | boolean | number | bigint | string | symbol; type ResolvableArray = Resolvable[]; type ResolvableObject = { [Key in string | number | symbol]?: Resolvable; }; type ResolvableFunction = () => Resolvable; type Resolvable = ResolvablePrimitive | ResolvableObject | ResolvableArray | ResolvableFunction; type Resolved = T; export type { IContext, IEffect, IMemo, IObservable, IObserver, IOwner, IRoot, ISchedulerAsync, ISchedulerSync, ISuperRoot, ISuspense }; export type { BatchFunction, CallbackFunction, CleanupFunction, ContextFunction, DisposeFunction, EffectFunction, ErrorFunction, EqualsFunction, MapFunction, MapValueFunction, MemoFunction, ObserverFunction, SelectorFunction, SuspenseFunction, TryCatchFunction, UntrackFunction, UntrackedFunction, UpdateFunction, WithFunction, WrappedFunction, WrappedDisposableFunction }; export type { EffectOptions }; export type { ForOptions }; export type { MemoOptions }; export type { Observable, ObservableLike, ObservableReadonly, ObservableReadonlyLike, ObservableOptions }; export type { Owner }; export type { StoreOptions }; export type { ArrayMaybe, Callable, CallableFunction, Constructor, Contexts, FunctionMaybe, Indexed, LazyArray, LazySet, LazyValue, PromiseMaybe, Resolvable, Resolved };