UNPKG

385 BTypeScriptView Raw
1export interface CreateContextOptions<T> {
2 strict?: boolean;
3 hookName?: string;
4 providerName?: string;
5 errorMessage?: string;
6 name?: string;
7 defaultValue?: T;
8}
9export type CreateContextReturn<T> = [
10 React.Provider<T>,
11 () => T,
12 React.Context<T>
13];
14export declare function createContext<T>(options?: CreateContextOptions<T>): CreateContextReturn<T>;