generated from antfu-collective/vitesse-webext
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shim.d.ts
37 lines (34 loc) · 912 Bytes
/
shim.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import type { ProtocolWithReturn } from 'webext-bridge'
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 }>
'modify-pages-changed': { source: string }
'update-element': { status: boolean; source?: string }
'copy-source': { source: string }
'get-source': ProtocolWithReturn<{}, string | undefined>
}
}
export interface Source {
name: string
repo: string
branch?: string
directory?: string
}
export interface BuildCliOptions {
/**
* Target platform
*/
target: ['chromium' | 'firefox']
/**
* Production mode
*/
prod: boolean
/**
* Extension name
* @default `target` value
*/
name?: string[] | undefined
}