-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
36 lines (31 loc) · 942 Bytes
/
index.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
// Type definitions for ByrnesJS 0.1.x
// Project: ByrnesJS
interface ByrnesJsLogger {
debug: (msg: string) => void,
info: (msg: string) => void,
warn: (msg: string) => void,
error: (msg: string) => void
}
interface ByrnesJsAllowDeclaration {
module: string | string[],
privileges: string | string[],
alwaysAllow?: boolean
}
interface ByrnesJsOptions {
rootDir: string,
logOnly?: boolean,
logger?: ByrnesJsLogger,
logOnlyStack?: boolean,
violationLogger?: (msg: string) => void,
allow: ByrnesJsAllowDeclaration[],
}
export function init(options: ByrnesJsOptions): void;
export const PRIV_ALL: string;
export const PRIV_FILESYSTEM: string;
export const PRIV_NETWORK: string;
export const PRIV_CHILD_PROCESS: string;
export const PRIV_VM: string;
export const PRIV_DGRAM: string;
export const PRIV_DNS: string;
export const PRIV_WORKER_THREADS: string;
export const PRIV_PROCESS: string;