react-calendar-kit
Version:
React Calendar Kit is a powerful and flexible library for building accessible and highly customizable calendar and date/time picker components in your React applications. React Calendar Kit provides a solid foundation for creating inclusive user experienc
16 lines (13 loc) • 726 B
TypeScript
import React__default from 'react';
/**
* Creates a safe context that can be used to provide and consume values in the React component tree.
*
* @param {string} errorMessage - The error message to throw if the context value is null.
* @template ContextValue - The type of the context value.
* @return {[(props: { value: ContextValue; children: React.ReactNode }) => JSX.Element, () => ContextValue]} - An array containing the Provider component and the useSafeContext hook.
*/
declare function createSafeContext<ContextValue>(errorMessage: string): readonly [({ children, value }: {
value: ContextValue;
children: React__default.ReactNode;
}) => JSX.Element, () => ContextValue];
export { createSafeContext };