(forceScope?: boolean)
| 5 | const ScopeContext = React.createContext(null as Scope | null) |
| 6 | export const {Provider} = ScopeContext |
| 7 | export function getScope(forceScope?: boolean) { |
| 8 | const scope = React.useContext(ScopeContext) |
| 9 | if (forceScope && !scope) |
| 10 | throwError('No scope found, consider adding <Provider> to app root') |
| 11 | return scope as Scope |
| 12 | } |
no test coverage detected
searching dependent graphs…