UNPKG

required-react-context

Version:

A simple React Context wrapper that throws an error if it is used without being provided

7 lines (4 loc) 233 B
import { Usable } from 'react'; import { b as NamedContext, U as UNSET_VALUE } from './types-DCc2LRKd.cjs'; declare function use<T>(usable: NamedContext<T | typeof UNSET_VALUE> | Usable<T | typeof UNSET_VALUE>): T; export { use };