/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import type { ValueModel } from "../models/index.js"; /** * A "feature set" is a set of features for a cluster. The names of features present appear in this set. * * TODO - Feature metadata is a bit messy and needs a refactor to consolidate available/supported and names/codes */ export declare class FeatureSet extends Set { /** * Create a new feature set from an iterable that returns active names or from an object of the form { [featureName: * string]: true } */ constructor(definition?: FeatureSet.Definition); /** * Access features as an array of feature names. */ get array(): string[]; /** * Access features as an object mapping feature name -> true. */ get record(): { [k: string]: boolean; }; /** * Determine if I am identical to another set. */ is(other?: FeatureSet): boolean; map(fn: (name: FeatureSet.Flag) => T): T[]; } export declare namespace FeatureSet { type Flag = string; type Flags = Iterable; type Definition = Flags | { [name: string]: boolean | undefined; }; /** * A feature as named by the specification. */ interface Named { name: string; title?: string; } /** * Resolve feature names to short codes. * * Callers name features in several ways: the specification's short code ("LT"), its title ("Lighting") or the * camelized title generated APIs expose ("lighting"). All resolve here so every entry point accepts the same * vocabulary. Match is case insensitive. * * @returns the resolved short codes and any names that resolve to no feature */ function resolve(features: readonly Named[], names: Iterable): { features: FeatureSet; unresolved: string[]; }; /** * The names {@link resolve} accepts, as the specification titles them. */ function titlesOf(features: readonly Named[]): string[]; /** * Normalize the feature map and list of supported feature names into sets of "all" and "supported" features by * abbreviation. * * The input feature set may reference features by short name ("LT") or long name ("lighting"). Name match is case * insensitive. */ function normalize(featureMap: ValueModel, supportedFeatures?: FeatureSet): { featuresAvailable: FeatureSet; featuresSupported: FeatureSet; }; } //# sourceMappingURL=FeatureSet.d.ts.map