import * as RefSubject from "@typed/fx/RefSubject"; import type { Versioned } from "@typed/fx/Versioned"; import { type Rendered } from "@typed/wire"; import type { NoSuchElementException } from "effect/Cause"; import * as Effect from "effect/Effect"; import * as Option from "effect/Option"; import type * as Scope from "effect/Scope"; import { ElementSource } from "./ElementSource.js"; export declare const ElementRefTypeId: unique symbol; export type ElementRefTypeId = typeof ElementRefTypeId; /** * A reference to a rendered element. * @since 1.0.0 */ export interface ElementRef extends Versioned { readonly [ElementRefTypeId]: RefSubject.RefSubject>; readonly query: ElementSource["query"]; readonly events: ElementSource["events"]; readonly elements: ElementSource["elements"]; readonly dispatchEvent: ElementSource["dispatchEvent"]; } /** * @since 1.0.0 */ export declare function make(): Effect.Effect, never, Scope.Scope>; /** * @since 1.0.0 */ export declare function of(rendered: T): Effect.Effect, never, Scope.Scope>; /** * @since 1.0.0 */ export declare const set: { (value: A): (elementRef: ElementRef) => Effect.Effect; (elementRef: ElementRef, value: A): Effect.Effect; }; /** * @since 1.0.0 */ export declare function dispatchEvent(ref: ElementRef, event: Event): Effect.Effect; export declare function isElementRef(value: unknown): value is ElementRef; //# sourceMappingURL=ElementRef.d.ts.map