-
Notifications
You must be signed in to change notification settings - Fork 0
/
typedoc.ts
43 lines (42 loc) · 1.17 KB
/
typedoc.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
38
39
40
41
42
43
/**
* The namespace used to access all of Border's extension APIs.
*/
namespace border {
/**
* Access the Blugin runtime API.
*/
export declare namespace runtime {
/**
* Send a message from an extension page to the background context.
* @param message The content of the message.
* @param onreply An optional function to call when the message is replied to.
*/
function sendMessage(
message: string,
onreply?: (reply) => void
):void;
/**
* Gets the extension manifest.
*/
function getManifest(): {
name: string,
description?: string,
version: string,
manifest_version: number,
permissions?: string[],
icons?: {
[string]: string
},
background?: {
scripts?: string[]
}
}
function on<K extends keyof BorderRuntimeEventType>(
type: K,
callback: (event: BorderRuntimeEventType[K]) => any
)
}
}
interface BorderRuntimeEventType {
"message": BorderRuntimeMessageEvent
}