init commit,

This commit is contained in:
louiscklaw
2025-05-28 09:55:51 +08:00
commit efe70ceb69
8042 changed files with 951668 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
// if not logged in, checked by profile is null or undefined
export default function IsLoggedIn(profile) {
if (!profile) return false;
return true;
}

View File

@@ -0,0 +1,11 @@
export interface DispatchObject {
[key: string]: any;
type: string;
}
type PromiseResolveValue<T> = T extends Promise<infer R> ? R : T;
type EffectType<T extends (...args: any) => any> = ReturnType<ReturnType<T>>;
type EffectReturnValue<T extends (...args: any) => any> = PromiseResolveValue<EffectType<T>>;
export type ActionType<T extends (...args: any) => any> = ReturnType<T> extends DispatchObject
? ReturnType<T>
: EffectReturnValue<T>;