UNPKG

@itwin/itwinui-react

Version:

A react component library for iTwinUI

7 lines (6 loc) 295 B
import * as React from 'react'; /** * Wrapper hook around `useContext` that throws an error if the context is not provided. * @param context Context to use. Must have a `displayName` for useful errors. */ export declare const useSafeContext: <T>(context: React.Context<T>) => NonNullable<T>;