forked from cursive-team/ring.backpocket.me
-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.d.ts
28 lines (26 loc) · 876 Bytes
/
global.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { LoginType, RegisterType, ProfileType } from "@/lib/schema/schema";
import { ProfileDisplayState } from "@/types";
import "little-state-machine";
/*
We use little-state-machine as a global state management library to store and share the user information across different pages and sections.
In particular, we are using it for collecting different user information for login/registration.
In this way, we can also have single file for the different steps of the login/registration process and simplify the code.
*/
declare module "little-state-machine" {
interface GlobalState {
login: LoginType;
register: RegisterType;
profile: ProfileType;
profileView: ProfileDisplayState;
isMenuOpen: boolean;
}
}
declare global {
interface Window {
render: () => void;
createjs: any;
FlowerRnd: any;
Flower: any;
_mtm: any[];
}
}