forked from sheepzh/time-tracker-4-browser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.ts
More file actions
28 lines (24 loc) · 670 Bytes
/
common.ts
File metadata and controls
28 lines (24 loc) · 670 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
export type LimitReason = {
cond: string
type: LimitType
allowDelay?: boolean
}
export type LimitType =
| "DAILY"
| "VISIT"
| "PERIOD"
export interface MaskModal {
addReason(reason: LimitReason): void
removeReason(reason: LimitReason): void
removeReasonsByType(type: LimitType): void
removeReasonsByTypeAndCond(type: LimitType, cound: string): void
addDelayHandler(handler: () => void): void
}
export type ModalContext = {
url: string
modal: MaskModal
}
export interface Processor {
handleMsg(code: timer.mq.ReqCode, data: any): timer.mq.Response | Promise<timer.mq.Response>
init(): void | Promise<void>
}