import { ContextMap } from '../context-map'; /** * Decorator that exposes a property's value to descendants as the * named {@link ContextMap} key. * * Descendants reading the same key via {@link SelectContext} resolve * the closest enclosing provider. Reassigning the property propagates * the new value to subscribers automatically. * * @typeParam K - The {@link ContextMap} key being provided. * @param key - The {@link ContextMap} key to provide. * @returns A `PropertyDecorator` that wires up the provider. * * @example Provide a value from a public prop * ```ts * import { Prop } from '@stencil/core'; * import { ProvideContext, User } from '@limetech/lime-web-components'; * * class MyComponent { * @Prop() * @ProvideContext('user') * public user: User; * } * ``` * * @example Provide a value from internal state * ```ts * import { State } from '@stencil/core'; * import { ProvideContext, User } from '@limetech/lime-web-components'; * * class MyComponent { * @State() * @ProvideContext('user') * private user: User; * } * ``` * * @beta * @group Context */ export declare function ProvideContext(key: K): PropertyDecorator;