You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
510 B
16 lines
510 B
export const EventScope = "updater" as const
|
|
|
|
// 原始事件映射类型
|
|
export type BaseEventMaps = {
|
|
"download-progress": (data: { percent: number; all: number; now: number }) => void
|
|
error: () => void
|
|
"checking-for-update": () => void
|
|
"update-available": () => void
|
|
"update-not-available": () => void
|
|
"update-downloaded": () => void
|
|
}
|
|
|
|
// 将 EventScope 添加到所有事件名称前缀
|
|
export type EventMaps = {
|
|
[K in keyof BaseEventMaps as `${typeof EventScope}:${K}`]: BaseEventMaps[K]
|
|
}
|
|
|