重构消息通信

This commit is contained in:
IndieKKY
2024-10-03 23:38:18 +08:00
parent e3ddf386cb
commit f50a2e3abd
13 changed files with 719 additions and 374 deletions

20
src/typings.d.ts vendored
View File

@@ -1,3 +1,23 @@
interface MessageData {
target: string
method: string
params?: any
[key: string]: any
}
interface MessageResult {
success: boolean
code: number
message?: string
data?: any
}
interface MethodContext {
event: any
sender?: chrome.runtime.MessageSender | null
}
interface EnvData {
autoExpand?: boolean
flagDot?: boolean