import type { LwcContextConsumer } from './contextUtils.js'; /** * Manages context for various providers */ export declare class ContextInfo { private infoMap; /** * The default value to be returned in the absence of a defined context */ private defaultValue; constructor(defaultValue: TContext); /** * Gets the stored info for a context provider * @param targetProvider the context provider */ getInfo(targetProvider: object): { consumers: Set; contextValue: TContext; }; /** * Set the context value directly associated with the target as a context provider. * * @param {Object} targetProvider * @param {FeatureContext} contextValue */ setContext(targetProvider: object, contextValue: TContext): void; /** * Get the context value directly associated with the target as a context provider. * * @param {Object} targetProvider */ getContext(targetProvider: object): TContext; /** * Clear the context value and registered subscribers directly associated with the * target as a context provider. * * @param {Object} targetProvider */ clearContext(targetProvider: object): void; /** * Subscribe a consumer to the context value directly associated with the target as * a context provider. Calls to #set(targetProvider, contextValue) with the same * target will invoke the consumer.provide(contextValue) function. * * NOTE: Mutations to the contextValue directly do not result in calls to * consumer.provide(contextValue). * * @param {Object} targetProvider * @param {ContextConsumer} consumer object with a provide(context) function property. */ subscribeContext(targetProvider: object, consumer: LwcContextConsumer): void; /** * Unsubscribe a previously subscribed consumer from listening to changes on the * target * @param {Object} targetProvider * @param {ContextConsumer} consumer */ unsubscribeContext(targetProvider: object, consumer: LwcContextConsumer): void; } //# sourceMappingURL=contextInfo.d.ts.map