/** * The shared context interface for Quilt applications. Each Quilt library * augments this interface with its own optional, readonly fields. Application * code can also augment this interface to add app-specific context fields. * * @example * declare module '@quilted/preact-context' { * interface QuiltContext { * readonly myField?: MyType; * } * } */ export interface QuiltContext { } /** * The Preact context object that holds the shared `QuiltContext` value. * Use `QuiltFrameworkContextPreact.Provider` to provide context values, or use * the `useQuiltContext()` hook to read individual fields. */ export declare const QuiltFrameworkContextPreact: import("preact").Context; export interface UseQuiltContextHook { (field: K, options?: { optional?: false; }): NonNullable; (field: K, options: { optional: boolean; }): NonNullable | undefined; } /** * Reads a single field from the shared `QuiltContext`. By default, throws * if the field is not provided. Pass `{optional: true}` to return `undefined` * instead of throwing. */ export declare const useQuiltContext: UseQuiltContextHook; //# sourceMappingURL=quilt-context.d.ts.map