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] }