UNPKG

tdesign-react

Version:
13 lines (12 loc) 306 B
import React, { PropsWithChildren } from 'react'; /** * 基于 Hook 创建一个 Context * @param hook * @returns */ export declare function createHookContext<T, P>(hook: (value: P) => T): { Provider: (props: PropsWithChildren<{ value: P; }>) => React.JSX.Element; use: () => T; };