-
Notifications
You must be signed in to change notification settings - Fork 7
/
global.d.ts
31 lines (29 loc) · 990 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
29
30
31
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;
signatures: Array<{ pubKey: string; timestamp: number }>;
artworkHeight: number;
artworkWidth: number;
params: any;
myPubKey: string;
stamp: any;
params: any;
}
}