UNPKG

create-chuntianxiaozhu

Version:

春天小猪模板工具

23 lines (18 loc) 580 B
import type * as React from "react"; import type { RouteConfig } from "@ice/runtime/types"; export interface LoginStateConfig { initialLoginState: boolean; NoLoginFallback?: React.ComponentType<{ routeConfig: RouteConfig }>; } export type LoginStateType = boolean; export type ContextType = [ LoginStateType, React.Dispatch<React.SetStateAction<LoginStateType>> ]; export type Auth = (data?: any) => Promise<LoginStateConfig> | LoginStateConfig; export function defineLoginStateConfig(fn: Auth) { return fn; } export interface ConfigAuth { loginState?: boolean; }