-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.d.ts
More file actions
31 lines (28 loc) · 752 Bytes
/
types.d.ts
File metadata and controls
31 lines (28 loc) · 752 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
type Time = {
hours: number,
minutes: number,
seconds: number,
}
type TimeZone = {
zoneName: string,
gmtOffset: number,
gmtOffsetName: string,
abbreviation: string,
tzName: string,
}
type StoreState = {
clockLoading: boolean,
time: Time,
timeFormatted: boolean,
isDigital: boolean,
countryTimezones: TimeZone[],
selectedTimeZone: TimeZone,
}
type StoreAction = {
toggleClockLoading: () => void,
updateTime: (setTime: Time) => void,
toggleTimeFormatted: () => void,
toggleIsDigital: () => void,
updateCountryTimezones: (setCountryTimezones: StoreState['countryTimezones']) => void,
updateSelectedTimeZone: (setSelectedTimeZone: StoreState['selectedTimeZone']) => void,
}