-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
shim.d.ts
21 lines (20 loc) · 1.08 KB
/
shim.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import type { ProtocolWithReturn } from 'webext-bridge'
import type { ICaptchaResponse, ISettingsMap } from '~/types'
declare module 'webext-bridge' {
export interface ProtocolMap {
// define message protocol types
// see https://github.com/antfu/webext-bridge#type-safe-protocols
// 'tab-prev': { title: string | undefined }
// 'get-current-tab': ProtocolWithReturn<{ tabId: number }, { title?: string }>
'set_selected_role': { uid: string }
'set_role_status': { uid: string; status: boolean }
'delete_role_request': ProtocolWithReturn<{ uid: string }, boolean>
'request_cookie_read': ProtocolWithReturn<{ oversea: boolean }, number>
'create_verification': ProtocolWithReturn<{ uid: string }, ICaptchaResponse | false>
'get_selected_role': ProtocolWithReturn<{}, string>
'finish_captcha': ProtocolWithReturn<{ geetest: ICaptchaRequest; uid: string; tabId: number }, boolean>
'request_captcha': { verification: ICaptchaResponse; uid: string; tabId: number }
'write_settings': ISettingsMap
'read_settings': ProtocolWithReturn<{ }, ISettingsMap>
}
}