Files
NapCatQQ/.pnpm-store/v3/files/2f/466f4ba54b0cd934ff6871ee527c5f0387edec7f4ea76f13a2a6775acbd74993f59d9f52e46a236cb475a4185ef134f6e9a4699c8fdbf4a2a4ca1853733c91
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

27 lines
806 B
Plaintext

import * as React from 'react';
interface CreateContextOptions {
/**
* If `true`, React will throw if context is `null` or `undefined`
* In some cases, you might want to support nested context, so you can set it to `false`
*/
strict?: boolean;
/**
* Error message to throw if the context is `undefined`
*/
errorMessage?: string;
/**
* The display name of the context
*/
name?: string;
}
type CreateContextReturn<T> = [React.Provider<T>, () => T, React.Context<T>];
/**
* Creates a named context, provider, and hook.
*
* @param options create context options
*/
declare function createContext<ContextType>(options?: CreateContextOptions): CreateContextReturn<ContextType>;
export { CreateContextOptions, CreateContextReturn, createContext };