Optimized code and wrote documentation

This commit is contained in:
Kevin FEDYNA
2025-01-22 11:15:43 +01:00
parent 3ce1273455
commit 8a5461827e
5 changed files with 113 additions and 61 deletions
+10 -3
View File
@@ -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>;