/** * Permission 和 Auth 深度整合 * permission 函数和当前的 auth 状态都能决定 route 的渲染结果, fallback 默认为 AppError * 当 checkAuth 为 true 时会使用 AuthGuard */ import { History } from 'history'; import React, { FC } from 'react'; export declare const PrivateRouter: FC<{ permission?: CheckRoutePermission; }>; export interface CheckRoutePermission { (history: History): Promise; } export declare const Route: React.FC<{ path?: string | string[]; exact?: boolean; permission?: CheckRoutePermission; redirectPath?: string; renderFallback?: (error: Error) => React.ReactElement; requireAuth?: boolean; component?: any; render?: (props: any) => React.ReactElement; renderError?: (e: any) => any; fallback?: any; }>;