-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclosure-externs.js
73 lines (62 loc) · 1.3 KB
/
closure-externs.js
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/**
* @externs
*/
/* eslint-disable @typescript-eslint/no-unused-vars */
// ESBuild seems to put undefined references in CJS exports
// These come from exports/bare.ts
/** @const {undefined} */
var freezePrototypes, hardenGlobals;
// Node.js modules
/** @const */
var vm = {};
/**
* @constructor
*/
vm.Context = function () {};
/**
* @param {string} code
* @param {vm.Context} context
* @param {string=} filename
*/
vm.runInContext = function (code, context, filename) {};
/**
* @param {Object.<string,*>=} initSandbox
* @return {vm.Context}
* @nosideeffects
*/
vm.createContext = function (initSandbox) {};
/**
* @param {string} code
* @param {Array<string>=} params
* @param {Object.<string,*>=} options
* @return {Function}
* @nosideeffects
*/
vm.compileFunction = function (code, params, options) {};
/**
* @const
*/
var worker_threads = {};
/**
* @type {boolean}
*/
worker_threads.isMainThread;
/**
* @type {*}
*/
worker_threads.workerData;
/**
* @constructor
* @param {string | URL} filename
* @param {Object.<string, *>=} options
*/
worker_threads.Worker = function (filename, options) {};
/**
* @param {MessagePort} port
* @param {vm.Context} contextifiedSandbox
* @return {MessagePort}
*/
worker_threads.moveMessagePortToContext = function (
port,
contextifiedSandbox,
) {};