Optimized code and wrote documentation
This commit is contained in:
+10
-3
@@ -1,11 +1,18 @@
|
||||
import { type RegularTagNode, type TextNode } from "@melvdouc/xml-parser";
|
||||
import { AsyncRoute } from "$fresh/src/server/types.ts";
|
||||
|
||||
export interface State {
|
||||
isAuthenticated: boolean;
|
||||
interface AuthenticatedState {
|
||||
isAuthenticated: true;
|
||||
session: CasContent;
|
||||
}
|
||||
|
||||
interface UnauthenticatedState {
|
||||
isAuthenticated: false;
|
||||
session: undefined;
|
||||
}
|
||||
|
||||
export type State = AuthenticatedState | UnauthenticatedState;
|
||||
|
||||
export interface AppProperties {
|
||||
name: string;
|
||||
icon: string;
|
||||
@@ -56,4 +63,4 @@ export interface LoginJWT {
|
||||
export type EmptyObject = Record<string | number | symbol, never>;
|
||||
|
||||
// deno-lint-ignore no-explicit-any
|
||||
export type Route = AsyncRoute<any, State>;
|
||||
export type Route = AsyncRoute<any, State>;
|
||||
|
||||
Reference in New Issue
Block a user