/** * Optional context helper. * * Svelte's built-in `createContext()` getter throws `missing_context` * when no parent component set the value. That is correct for compound * components (Tab, Accordion, …) where the sub-components must live * inside the parent. For *optional* contexts (e.g. BlocksProvider, * ButtonGroup wrapping individual Buttons, IconProvider) we want the * getter to silently return `undefined` instead. * * This helper provides the same `[get, set]` shape as `createContext` * but with a `() => T | undefined` getter that uses `hasContext` to * differentiate between "no provider" (return undefined) and "provider * deliberately set the value to undefined" (return undefined too — * the consumer can't tell the difference, which is fine for opt-in * APIs). */ export declare function createOptionalContext(): readonly [ () => T | undefined, (value: T | undefined) => T | undefined ];