/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { Diagnostic } from "../log/Diagnostic.js"; import type { Environment } from "./Environment.js"; import { Environmental } from "./Environmental.js"; /** * Environmental configuration values. */ export declare class VariableService { #private; [Diagnostic.value]: string; constructor(environment: Environment); static [Environmental.create](environment: Environment): VariableService; get vars(): VariableService.Map; /** * Configure a component. * * Runs the supplied {@link configurator} immediately and whenever variables reference by the {@link configurator} * change. * * To terminate reconfiguration invoke {@link VariableService.Usage.close} on the return value. */ use(configurator: () => void): VariableService.Usage; get(name: string, fallback?: T): T; get(name: string, fallback: T): T; get(name: string): T | undefined; has(name: string): boolean; set(name: string, value: VariableService.Value): void; persist(name: string, value: VariableService.Value): Promise; persistConfigValue?: (name: string, value: VariableService.Value) => Promise; string(name: string): string; boolean(name: string): boolean; number(name: string): number | undefined; integer(name: string, fallback?: number): number | undefined; increment(name: string): number; addConfigStyle(vars: VariableService.Map): void; addUnixEnvStyle(vars: Record): void; addArgvStyle(vars: string[]): void; } export declare namespace VariableService { interface Options { unixEnvStyle?: Record; argvStyle?: string[]; configStyle?: Map; } interface Map extends Record { } type List = Value[]; type Primitive = number | string | boolean; type Value = Primitive | Map | List; interface Usage { variables: Set; configurator(): void; close(): void; } } //# sourceMappingURL=VariableService.d.ts.map