import { type Reference } from "@knyt/artisan"; import type { ReactiveController, ReactiveControllerHost } from "../ReactiveController.ts"; /** @public */ export type Context = { Consumer: { new (host: ReactiveControllerHost, options: { onUpdate?: Reference.UpdateHandler; target: Reference.Maybe; }): Context.ConsumerType; }; Provider: { new (host: ReactiveControllerHost, options: { target: Reference.Maybe; }): Context.ProviderType; }; createConsumer(host: ReactiveControllerHost & HTMLElement): Context.ConsumerType; createProvider(host: ReactiveControllerHost & HTMLElement): Context.ProviderType; readonly initialValue: T; }; export declare namespace Context { type ToValue = C extends Context ? T : never; /** @public */ type ConsumerType = ReactiveController & Reference.Readonly; /** @public */ type ProviderType = ReactiveController & Reference; /** * Infer the context consumer type from a context type. * * @public */ type InferConsumer = ConsumerType>; /** * Infer the context provider type from a context type. * * @public */ type InferProvider = ProviderType>; } /** @internal scope: workspace */ export type ValueUpdateHandler = (value: T) => void; //# sourceMappingURL=types.d.ts.map