UNPKG

464 BTypeScriptView Raw
1import * as React from 'react';
2/**
3 * A type of an object that have a route key as an object key
4 * and a value whether to prevent that route.
5 */
6export declare type PreventedRoutes = Record<string, {
7 preventRemove: boolean;
8}>;
9declare const PreventRemoveContext: React.Context<{
10 preventedRoutes: PreventedRoutes;
11 setPreventRemove: (id: string, routeKey: string, preventRemove: boolean) => void;
12} | undefined>;
13export default PreventRemoveContext;