import { type DirectiveResult } from '../index.js'; import { type ElementRefLifecycle } from './ElementRefLifecycle.js'; /** * The elements a template designates, each with the options it declares: * * ```ts * readonly swatches = new ElementRefs() * ``` * ```html * ${this.colors.map(color => html``)} * ``` * * {@link ElementRef} at the other cardinality: iterating yields the elements as `value` yields the * one, and {@link get} answers what an element was declared with as `options` answers it for the one. * * Elements no template can put a directive on are designated through {@link set} and {@link delete}. * * Iteration is in the order the elements were FIRST declared, so a collection whose order can change * orders itself by what it declared. */ export declare class ElementRefs implements Iterable { private readonly lifecycle; constructor(lifecycle?: ElementRefLifecycle); private readonly optionsByElement; /** Designates the element it is rendered on. */ readonly ref: (options: TOptions) => DirectiveResult; get size(): number; [Symbol.iterator](): MapIterator; has(element: T): boolean; /** What the element was declared with. */ get(element: T): TOptions | undefined; /** Designates an element by hand. */ set(element: T, options: TOptions): void; /** Forgets an element. */ delete(element: T): boolean; } //# sourceMappingURL=ElementRefs.d.ts.map