UNPKG

stratakit

Version:

stratakit - Meta-framework React puro con Auto Router automático, file-based routing, SEO automático y performance superior

46 lines (45 loc) 1.11 kB
export interface Route { path: string; component: React.ComponentType<any>; title?: string; description?: string; isPrivate?: boolean; middleware?: string[]; guards?: string[]; exact?: boolean; meta?: { title?: string; description?: string; keywords?: string[]; image?: string; noIndex?: boolean; requiresAuth?: boolean; permissions?: string[]; roles?: string[]; }; children?: Route[]; redirect?: string; layout?: React.ComponentType<any>; errorBoundary?: React.ComponentType<any>; } export interface RouterConfig { mode: 'hash' | 'history'; base: string; fallback: React.ComponentType; loadingComponent?: React.ComponentType; errorComponent?: React.ComponentType<{ error: Error; }>; } export interface NavigationOptions { replace?: boolean; state?: any; scrollToTop?: boolean; animate?: boolean; } export interface RouteMatch { route: Route; params: Record<string, string>; query: Record<string, string>; isExact: boolean; }