This commit is contained in:
IndieKKY
2024-10-04 15:31:51 +08:00
parent 6ffb9073ab
commit 564f032e3a
6 changed files with 27 additions and 9 deletions

3
src/typings.d.ts vendored
View File

@@ -1,5 +1,7 @@
type MessageFrom = 'extension' | 'inject' | 'app'
interface MessageData {
from: MessageFrom
target: string
method: string
params?: any
@@ -14,6 +16,7 @@ interface MessageResult {
}
interface MethodContext {
from: MessageFrom
event: any
sender?: chrome.runtime.MessageSender | null
}