import { isTag } from './shared';
export declare const asyncOpcodes: WeakSet<tagOp>;
export declare const opsForTag: Map<number, Array<tagOp>>;
export declare const tagsToRevalidate: Set<Cell>;
export declare const relatedTags: Map<number, Set<MergedCell>>;
export declare const DEBUG_MERGED_CELLS: Set<MergedCell>;
export declare const DEBUG_CELLS: Set<Cell<unknown>>;
export declare const cellsMap: WeakMap<object, Map<string | number | symbol, Cell<unknown>>>;
export declare function getCells(): Cell<unknown>[];
export declare function getMergedCells(): MergedCell[];
export declare function tracked(klass: any, key: string, descriptor?: PropertyDescriptor & {
    initializer?: () => any;
}): void;
export type AnyCell = Cell | MergedCell;
export declare function isRendering(): boolean;
export declare function setIsRendering(value: boolean): void;
export declare class Cell<T extends unknown = unknown> {
    _value: T;
    id: number;
    toHTML: () => string;
    [Symbol.toPrimitive](): T;
    _debugName?: string | undefined;
    [isTag]: boolean;
    constructor(value: T, debugName?: string);
    get value(): T;
    set value(value: T);
    update(value: T): void;
}
export declare class LazyCell<T extends unknown = unknown> extends Cell<() => T> {
    __value: T;
    constructor(v: () => T, debugName?: string);
}
export declare function listDependentCells(cells: Array<AnyCell>, cell: MergedCell): string;
export declare function opsFor(cell: AnyCell): tagOp[];
export declare function relatedTagsForCell(cell: Cell): Set<MergedCell>;
export declare class MergedCell {
    fn: Fn | Function;
    toHTML: () => string;
    isConst: boolean;
    isDestroyed: boolean;
    id: number;
    [Symbol.toPrimitive](): any;
    _debugName?: string | undefined;
    relatedCells: Set<Cell> | null;
    [isTag]: boolean;
    constructor(fn: Fn | Function, debugName?: string);
    destroy(): void;
    get value(): any;
}
export type tagOp = (...values: unknown[]) => Promise<void> | void;
export declare function executeTag(tag: Cell | MergedCell): Promise<void>;
export declare function lazyRawCellFor<T extends object, K extends keyof T>(obj: T, key: K, init?: () => T[K]): Cell<T[K]>;
export declare function rawCellFor<T extends object, K extends keyof T>(obj: T, key: K): Cell<T[K]>;
export declare function cellFor<T extends object, K extends keyof T>(obj: T, key: K, skipDefine?: boolean): Cell<T[K]>;
type Fn = () => unknown;
export declare function formula(fn: Function | Fn, debugName?: string): MergedCell;
export declare function deepFnValue(fn: Function | Fn): any;
export declare function cell<T>(value: T, debugName?: string): Cell<T>;
export declare function inNewTrackingFrame(callback: () => void): void;
export declare function getTracker(): Set<Cell<unknown>> | null;
export declare function setTracker(tracker: Set<Cell> | null): void;
export {};
