-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
34 lines (31 loc) · 869 Bytes
/
types.ts
File metadata and controls
34 lines (31 loc) · 869 Bytes
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
32
33
34
import { RegisterOptions } from "react-hook-form";
export interface Picture {
urls: string;
color: string;
}
export interface Item {
cartegory: string;
brand: string;
name: string;
price: number;
isFast: boolean;
imgUrl: string;
color: string;
}
export type Option<T> = [keyof T, RegisterOptions];
export type OptionCreator = <T>(option: Option<T>) => SubOptionCreator<T>;
export type SubOptionCreator<T> = (customOpts?: RegisterOptions) => Option<T>;
export interface LoginForm {
email: string;
password: string;
}
export interface JoinForm extends LoginForm {
size?: 220 | 230 | 240 | 250 | 260 | 270 | 280 | 290 | 300 | 310 | 320 | 330;
age: [boolean, boolean];
notification: [boolean, boolean, boolean];
["age.0"]: boolean;
["age.1"]: boolean;
["age.2"]: boolean;
["notification.0"]: boolean;
["notification.1"]: boolean;
}