UNPKG

@assistant-ui/react

Version:

TypeScript/React library for AI Chat

11 lines 479 B
import { Context } from "react"; /** * Creates a context hook with optional support. * @param context - The React context to consume. * @param providerName - The name of the provider for error messages. * @returns A hook function that provides the context value. */ export declare function createContextHook<T>(context: Context<T | null>, providerName: string): (options?: { optional?: boolean | undefined; }) => T | null; //# sourceMappingURL=createContextHook.d.ts.map