import React from "react"; //#region src/react/hooks/createContextAndHook.d.ts /** * Assert that the context value exists, otherwise throw an error. * * @internal */ declare function assertContextExists(contextVal: unknown, msgOrCtx: string | React.Context): asserts contextVal; type Options = { assertCtxFn?: (v: unknown, msg: string) => void; }; type ContextOf = React.Context<{ value: T; } | undefined>; type UseCtxFn = () => T; /** * Create and return a Context and two hooks that return the context value. * The Context type is derived from the type passed in by the user. * * The first hook returned guarantees that the context exists so the returned value is always `CtxValue` * The second hook makes no guarantees, so the returned value can be `CtxValue | undefined` * * @internal */ declare const createContextAndHook: (displayName: string, options?: Options) => [ContextOf, UseCtxFn, UseCtxFn>]; //#endregion export { assertContextExists, createContextAndHook }; //# sourceMappingURL=createContextAndHook.d.mts.map