import { Graph } from "./graph.js"; import { Behavior, BehaviorBuilder } from "./behavior.js"; import { Moment, Resource, State } from "./resource.js"; import { RelinkingOrder } from "./common.js"; export declare enum ExtentRemoveStrategy { extentOnly = 0, containedLifetimes = 1 } declare class ExtentLifetime { addedToGraphWhen: number | null; extents: Set; children: Set | null; parent: ExtentLifetime | null; constructor(extent: Extent); unify(extent: Extent): void; addChild(extent: Extent): void; addChildLifetime(lifetime: ExtentLifetime): void; hasCompatibleLifetime(lifetime: ExtentLifetime | null): boolean; getAllContainedExtents(): Extent[]; getAllContainingExtents(): Extent[]; } export declare class Extent { debugConstructorName: string | undefined; debugName: string | undefined; behaviors: Behavior[]; resources: Resource[]; graph: Graph; addedToGraphWhen: number | null; addedToGraph: State; lifetime: ExtentLifetime | null; unsubscribes: Set<() => void>; static readonly removeContainedLifetimes = ExtentRemoveStrategy.containedLifetimes; static readonly relinkingOrderSubsequent = RelinkingOrder.relinkingOrderSubsequent; constructor(graph: Graph); debugHere(): string; unifyLifetime(extent: T): void; addChildLifetime(extent: T): void; hasCompatibleLifetime(extent: T): boolean; addBehavior(behavior: Behavior): void; addResource(resource: Resource): void; addToGraphWithAction(debugName?: string): void; addToGraph(): void; removeFromGraphWithAction(strategy?: ExtentRemoveStrategy, debugName?: string): void; removeFromGraph(strategy?: ExtentRemoveStrategy): void; subscribeToJustUpdated(resources: Resource[], callback: (ext: this) => void): () => void; unsubscribeAll(): void; nameResources(): void; behavior(): BehaviorBuilder; resource(name?: string): Resource; moment(name?: string): Moment; state(initialState: T, name?: string): State; sideEffect(block: (ext: this) => void, debugName?: string): void; actionAsync(action: (ext: this) => void, debugName?: string): Promise; action(action: (ext: this) => void, debugName?: string): void; } export {};