/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import type { DeviceTypeFacts } from "./DeviceTypeFacts.js"; /** * The reaching endpoints of one node scope and what each contributes to the facts of the whole scope: the network * interfaces it supports, the conditions it asserts on the node endpoint and whether it declares a singleton. * * Each member's contribution is read once and kept until the member is {@link invalidate invalidated}, removed or added * again, so the facts of the scope cost as much as the members read since the last time. The conditions asserted on the * node endpoint are also read again whenever the node conditions they were read under differ, because a member's * conditions include them. * * A `DeviceTypeValidationPass` without a scope index builds one per node scope from a walk of the scope; a scope index * keeps one across passes and must add, remove and invalidate members as the tree changes. * * @internal */ export declare class ReachingEndpoints implements Iterable { #private; constructor(members?: Iterable); get size(): number; has(endpoint: E): boolean; [Symbol.iterator](): MapIterator; /** * Make {@link endpoint} a member whose contribution is read on next request. */ add(endpoint: E): void; /** * @returns whether {@link endpoint} was a member */ delete(endpoint: E): boolean; /** * Read the contribution of {@link endpoint} again on next request, if it is a member. */ invalidate(endpoint: E): void; /** * The network interface conditions the members support. */ interfaceConditions(read: (endpoint: E) => FactsContribution): ReadonlySet; /** * The members that declare a singleton, in tree order. */ declarers(read: (endpoint: E) => FactsContribution, facts: DeviceTypeFacts): readonly E[]; /** * The conditions the members assert on the node endpoint, each read under {@link nodeConditions}. */ assertedConditions(nodeConditions: ReadonlySet, read: (endpoint: E) => Iterable): Set; /** * {@link endpoints} in the order a walk of their tree visits them: an endpoint before its descendants, parts in the * order their owner lists them. */ static inTreeOrder(endpoints: E[], facts: DeviceTypeFacts): E[]; } /** * What a member contributes through its own facts alone. * * @internal */ export interface FactsContribution { interfaces: readonly string[]; declares: boolean; } //# sourceMappingURL=ReachingEndpoints.d.ts.map