refactor(typing): create interfaces to ensure strongly typed form data

This commit is contained in:
parent 9bf5e9dc38
commit 972e8fa646
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C
3 changed files with 47 additions and 0 deletions

@ -0,0 +1,26 @@
interface SubBody {
stories: number[];
authors: number[];
bands: number[];
}
interface FavBody {
stories: number[];
authors: number[];
}
interface HideBody {
authors: number[];
bands: number[];
}
export interface SubPayload {
push: SubBody;
pull: SubBody;
}
export interface FavPayload {
push: FavBody;
pull: FavBody;
}
export interface HidePayload {
push: HideBody;
pull: HideBody;
}

@ -0,0 +1,21 @@
export interface MyStuff {
email?: string;
password?: string;
newPassword?: string;
username?: string;
disclaimer?: string;
hidden?: boolean;
nightMode?: boolean;
reviewReply?: boolean;
}
export interface Profile {
occupation?: string;
location?: string;
website?: string;
blog?: string;
bio?: string;
showEmail?: boolean;
signature?: string;
avatar?: string;
}