import { type Context, useContext as useReactContext } from 'react'; function useContext(context: Context): T { const contextValue = useReactContext(context); if (!contextValue) { throw new Error('useContext must be used within a Provider'); } return contextValue; } export { useContext, };