@wbce/projen-d9 0.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/.jsii +552 -0
  2. package/API.md +8472 -0
  3. package/CHANGELOG.md +189 -0
  4. package/LICENSE +674 -0
  5. package/README.md +82 -0
  6. package/lib/cli/commands/init.d.ts +1 -0
  7. package/lib/cli/commands/init.js +8 -0
  8. package/lib/cli/commands/save/apply-snapshot.d.ts +7 -0
  9. package/lib/cli/commands/save/apply-snapshot.js +278 -0
  10. package/lib/cli/commands/save/cli.d.ts +8 -0
  11. package/lib/cli/commands/save/cli.js +33 -0
  12. package/lib/cli/commands/save/draft.d.ts +0 -0
  13. package/lib/cli/commands/save/draft.js +2 -0
  14. package/lib/cli/commands/save/utils.d.ts +9 -0
  15. package/lib/cli/commands/save/utils.js +123 -0
  16. package/lib/cli/commands/sync.d.ts +5 -0
  17. package/lib/cli/commands/sync.js +13 -0
  18. package/lib/cli/index.d.ts +2 -0
  19. package/lib/cli/index.js +44 -0
  20. package/lib/index.d.ts +59 -0
  21. package/lib/index.js +322 -0
  22. package/node_modules/@types/node/LICENSE +21 -0
  23. package/node_modules/@types/node/README.md +16 -0
  24. package/node_modules/@types/node/assert.d.ts +117 -0
  25. package/node_modules/@types/node/async_hooks.d.ts +246 -0
  26. package/node_modules/@types/node/buffer.d.ts +22 -0
  27. package/node_modules/@types/node/child_process.d.ts +507 -0
  28. package/node_modules/@types/node/cluster.d.ts +260 -0
  29. package/node_modules/@types/node/console.d.ts +3 -0
  30. package/node_modules/@types/node/constants.d.ts +448 -0
  31. package/node_modules/@types/node/crypto.d.ts +1183 -0
  32. package/node_modules/@types/node/dgram.d.ts +118 -0
  33. package/node_modules/@types/node/dns.d.ts +372 -0
  34. package/node_modules/@types/node/domain.d.ts +16 -0
  35. package/node_modules/@types/node/events.d.ts +47 -0
  36. package/node_modules/@types/node/fs.d.ts +2567 -0
  37. package/node_modules/@types/node/globals.d.ts +1351 -0
  38. package/node_modules/@types/node/globals.global.d.ts +1 -0
  39. package/node_modules/@types/node/http.d.ts +456 -0
  40. package/node_modules/@types/node/http2.d.ts +952 -0
  41. package/node_modules/@types/node/https.d.ts +156 -0
  42. package/node_modules/@types/node/index.d.ts +91 -0
  43. package/node_modules/@types/node/inspector.d.ts +3040 -0
  44. package/node_modules/@types/node/module.d.ts +3 -0
  45. package/node_modules/@types/node/net.d.ts +290 -0
  46. package/node_modules/@types/node/os.d.ts +263 -0
  47. package/node_modules/@types/node/package.json +195 -0
  48. package/node_modules/@types/node/path.d.ts +159 -0
  49. package/node_modules/@types/node/perf_hooks.d.ts +259 -0
  50. package/node_modules/@types/node/process.d.ts +15 -0
  51. package/node_modules/@types/node/punycode.d.ts +75 -0
  52. package/node_modules/@types/node/querystring.d.ts +29 -0
  53. package/node_modules/@types/node/readline.d.ts +158 -0
  54. package/node_modules/@types/node/repl.d.ts +390 -0
  55. package/node_modules/@types/node/stream.d.ts +334 -0
  56. package/node_modules/@types/node/string_decoder.d.ts +7 -0
  57. package/node_modules/@types/node/timers.d.ts +16 -0
  58. package/node_modules/@types/node/tls.d.ts +713 -0
  59. package/node_modules/@types/node/trace_events.d.ts +61 -0
  60. package/node_modules/@types/node/tty.d.ts +66 -0
  61. package/node_modules/@types/node/url.d.ts +147 -0
  62. package/node_modules/@types/node/util.d.ts +200 -0
  63. package/node_modules/@types/node/v8.d.ts +197 -0
  64. package/node_modules/@types/node/vm.d.ts +112 -0
  65. package/node_modules/@types/node/wasi.d.ts +55 -0
  66. package/node_modules/@types/node/worker_threads.d.ts +207 -0
  67. package/node_modules/@types/node/zlib.d.ts +356 -0
  68. package/node_modules/@types/pg/LICENSE +21 -0
  69. package/node_modules/@types/pg/README.md +15 -0
  70. package/node_modules/@types/pg/index.d.mts +56 -0
  71. package/node_modules/@types/pg/index.d.ts +360 -0
  72. package/node_modules/@types/pg/lib/connection-parameters.d.ts +58 -0
  73. package/node_modules/@types/pg/lib/type-overrides.d.ts +77 -0
  74. package/node_modules/@types/pg/package.json +38 -0
  75. package/node_modules/@types/pg-copy-streams/LICENSE +21 -0
  76. package/node_modules/@types/pg-copy-streams/README.md +38 -0
  77. package/node_modules/@types/pg-copy-streams/index.d.ts +19 -0
  78. package/node_modules/@types/pg-copy-streams/package.json +28 -0
  79. package/node_modules/commander/LICENSE +22 -0
  80. package/node_modules/commander/Readme.md +1176 -0
  81. package/node_modules/commander/esm.mjs +16 -0
  82. package/node_modules/commander/index.js +24 -0
  83. package/node_modules/commander/lib/argument.js +150 -0
  84. package/node_modules/commander/lib/command.js +2777 -0
  85. package/node_modules/commander/lib/error.js +39 -0
  86. package/node_modules/commander/lib/help.js +747 -0
  87. package/node_modules/commander/lib/option.js +380 -0
  88. package/node_modules/commander/lib/suggestSimilar.js +101 -0
  89. package/node_modules/commander/package-support.json +19 -0
  90. package/node_modules/commander/package.json +82 -0
  91. package/node_modules/commander/typings/esm.d.mts +3 -0
  92. package/node_modules/commander/typings/index.d.ts +1113 -0
  93. package/node_modules/pg/LICENSE +21 -0
  94. package/node_modules/pg/README.md +95 -0
  95. package/node_modules/pg/esm/index.mjs +20 -0
  96. package/node_modules/pg/lib/client.js +743 -0
  97. package/node_modules/pg/lib/connection-parameters.js +171 -0
  98. package/node_modules/pg/lib/connection.js +221 -0
  99. package/node_modules/pg/lib/crypto/cert-signatures.js +122 -0
  100. package/node_modules/pg/lib/crypto/sasl.js +212 -0
  101. package/node_modules/pg/lib/crypto/utils-legacy.js +43 -0
  102. package/node_modules/pg/lib/crypto/utils-webcrypto.js +89 -0
  103. package/node_modules/pg/lib/crypto/utils.js +9 -0
  104. package/node_modules/pg/lib/defaults.js +91 -0
  105. package/node_modules/pg/lib/index.js +73 -0
  106. package/node_modules/pg/lib/native/client.js +323 -0
  107. package/node_modules/pg/lib/native/index.js +2 -0
  108. package/node_modules/pg/lib/native/query.js +165 -0
  109. package/node_modules/pg/lib/query.js +252 -0
  110. package/node_modules/pg/lib/result.js +109 -0
  111. package/node_modules/pg/lib/stream.js +83 -0
  112. package/node_modules/pg/lib/type-overrides.js +35 -0
  113. package/node_modules/pg/lib/utils.js +217 -0
  114. package/node_modules/pg/package.json +76 -0
  115. package/node_modules/pg-copy-streams/Makefile +19 -0
  116. package/node_modules/pg-copy-streams/README.md +315 -0
  117. package/node_modules/pg-copy-streams/copy-both.js +267 -0
  118. package/node_modules/pg-copy-streams/copy-from.js +173 -0
  119. package/node_modules/pg-copy-streams/copy-to.js +177 -0
  120. package/node_modules/pg-copy-streams/eslint.config.js +55 -0
  121. package/node_modules/pg-copy-streams/index.js +17 -0
  122. package/node_modules/pg-copy-streams/message-formats.js +27 -0
  123. package/node_modules/pg-copy-streams/obuf.js +376 -0
  124. package/node_modules/pg-copy-streams/package.json +51 -0
  125. package/package.json +136 -0
@@ -0,0 +1,112 @@
1
+ declare module 'vm' {
2
+ interface Context {
3
+ [key: string]: any;
4
+ }
5
+ interface BaseOptions {
6
+ /**
7
+ * Specifies the filename used in stack traces produced by this script.
8
+ * Default: `''`.
9
+ */
10
+ filename?: string | undefined;
11
+ /**
12
+ * Specifies the line number offset that is displayed in stack traces produced by this script.
13
+ * Default: `0`.
14
+ */
15
+ lineOffset?: number | undefined;
16
+ /**
17
+ * Specifies the column number offset that is displayed in stack traces produced by this script.
18
+ * @default 0
19
+ */
20
+ columnOffset?: number | undefined;
21
+ }
22
+ interface ScriptOptions extends BaseOptions {
23
+ displayErrors?: boolean | undefined;
24
+ timeout?: number | undefined;
25
+ cachedData?: Buffer | undefined;
26
+ /** @deprecated in favor of `script.createCachedData()` */
27
+ produceCachedData?: boolean | undefined;
28
+ }
29
+ interface RunningScriptOptions extends BaseOptions {
30
+ /**
31
+ * When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace.
32
+ * Default: `true`.
33
+ */
34
+ displayErrors?: boolean | undefined;
35
+ /**
36
+ * Specifies the number of milliseconds to execute code before terminating execution.
37
+ * If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer.
38
+ */
39
+ timeout?: number | undefined;
40
+ /**
41
+ * If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received.
42
+ * Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that.
43
+ * If execution is terminated, an `Error` will be thrown.
44
+ * Default: `false`.
45
+ */
46
+ breakOnSigint?: boolean | undefined;
47
+ }
48
+ interface CompileFunctionOptions extends BaseOptions {
49
+ /**
50
+ * Provides an optional data with V8's code cache data for the supplied source.
51
+ */
52
+ cachedData?: Buffer | undefined;
53
+ /**
54
+ * Specifies whether to produce new cache data.
55
+ * Default: `false`,
56
+ */
57
+ produceCachedData?: boolean | undefined;
58
+ /**
59
+ * The sandbox/context in which the said function should be compiled in.
60
+ */
61
+ parsingContext?: Context | undefined;
62
+
63
+ /**
64
+ * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling
65
+ */
66
+ contextExtensions?: Object[] | undefined;
67
+ }
68
+
69
+ interface CreateContextOptions {
70
+ /**
71
+ * Human-readable name of the newly created context.
72
+ * @default 'VM Context i' Where i is an ascending numerical index of the created context.
73
+ */
74
+ name?: string | undefined;
75
+ /**
76
+ * Corresponds to the newly created context for display purposes.
77
+ * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary),
78
+ * like the value of the `url.origin` property of a URL object.
79
+ * Most notably, this string should omit the trailing slash, as that denotes a path.
80
+ * @default ''
81
+ */
82
+ origin?: string | undefined;
83
+ codeGeneration?: {
84
+ /**
85
+ * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
86
+ * will throw an EvalError.
87
+ * @default true
88
+ */
89
+ strings?: boolean | undefined;
90
+ /**
91
+ * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
92
+ * @default true
93
+ */
94
+ wasm?: boolean | undefined;
95
+ } | undefined;
96
+ }
97
+
98
+ class Script {
99
+ constructor(code: string, options?: ScriptOptions);
100
+ runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any;
101
+ runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any;
102
+ runInThisContext(options?: RunningScriptOptions): any;
103
+ createCachedData(): Buffer;
104
+ cachedDataRejected?: boolean | undefined;
105
+ }
106
+ function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
107
+ function isContext(sandbox: Context): boolean;
108
+ function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any;
109
+ function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any;
110
+ function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
111
+ function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
112
+ }
@@ -0,0 +1,55 @@
1
+ declare module 'wasi' {
2
+ interface WASIOptions {
3
+ /**
4
+ * An array of strings that the WebAssembly application will
5
+ * see as command line arguments. The first argument is the virtual path to the
6
+ * WASI command itself.
7
+ */
8
+ args?: string[] | undefined;
9
+
10
+ /**
11
+ * An object similar to `process.env` that the WebAssembly
12
+ * application will see as its environment.
13
+ */
14
+ env?: object | undefined;
15
+
16
+ /**
17
+ * This object represents the WebAssembly application's
18
+ * sandbox directory structure. The string keys of `preopens` are treated as
19
+ * directories within the sandbox. The corresponding values in `preopens` are
20
+ * the real paths to those directories on the host machine.
21
+ */
22
+ preopens?: NodeJS.Dict<string> | undefined;
23
+
24
+ /**
25
+ * By default, WASI applications terminate the Node.js
26
+ * process via the `__wasi_proc_exit()` function. Setting this option to `true`
27
+ * causes `wasi.start()` to return the exit code rather than terminate the
28
+ * process.
29
+ * @default false
30
+ */
31
+ returnOnExit?: boolean | undefined;
32
+ }
33
+
34
+ class WASI {
35
+ constructor(options?: WASIOptions);
36
+ /**
37
+ *
38
+ * Attempt to begin execution of `instance` by invoking its `_start()` export.
39
+ * If `instance` does not contain a `_start()` export, then `start()` attempts to
40
+ * invoke the `__wasi_unstable_reactor_start()` export. If neither of those exports
41
+ * is present on `instance`, then `start()` does nothing.
42
+ *
43
+ * `start()` requires that `instance` exports a [`WebAssembly.Memory`][] named
44
+ * `memory`. If `instance` does not have a `memory` export an exception is thrown.
45
+ */
46
+ start(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
47
+
48
+ /**
49
+ * Is an object that implements the WASI system call API. This object
50
+ * should be passed as the `wasi_snapshot_preview1` import during the instantiation of a
51
+ * [`WebAssembly.Instance`][].
52
+ */
53
+ readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
54
+ }
55
+ }
@@ -0,0 +1,207 @@
1
+ declare module 'worker_threads' {
2
+ import { Context } from 'vm';
3
+ import EventEmitter = require('events');
4
+ import { Readable, Writable } from 'stream';
5
+ import { promises } from 'fs';
6
+
7
+ const isMainThread: boolean;
8
+ const parentPort: null | MessagePort;
9
+ const resourceLimits: ResourceLimits;
10
+ const SHARE_ENV: unique symbol;
11
+ const threadId: number;
12
+ const workerData: any;
13
+
14
+ class MessageChannel {
15
+ readonly port1: MessagePort;
16
+ readonly port2: MessagePort;
17
+ }
18
+
19
+ type TransferListItem = ArrayBuffer | MessagePort | promises.FileHandle;
20
+
21
+ class MessagePort extends EventEmitter {
22
+ close(): void;
23
+ postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
24
+ ref(): void;
25
+ unref(): void;
26
+ start(): void;
27
+
28
+ addListener(event: "close", listener: () => void): this;
29
+ addListener(event: "message", listener: (value: any) => void): this;
30
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
31
+
32
+ emit(event: "close"): boolean;
33
+ emit(event: "message", value: any): boolean;
34
+ emit(event: string | symbol, ...args: any[]): boolean;
35
+
36
+ on(event: "close", listener: () => void): this;
37
+ on(event: "message", listener: (value: any) => void): this;
38
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
39
+
40
+ once(event: "close", listener: () => void): this;
41
+ once(event: "message", listener: (value: any) => void): this;
42
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
43
+
44
+ prependListener(event: "close", listener: () => void): this;
45
+ prependListener(event: "message", listener: (value: any) => void): this;
46
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
47
+
48
+ prependOnceListener(event: "close", listener: () => void): this;
49
+ prependOnceListener(event: "message", listener: (value: any) => void): this;
50
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
51
+
52
+ removeListener(event: "close", listener: () => void): this;
53
+ removeListener(event: "message", listener: (value: any) => void): this;
54
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
55
+
56
+ off(event: "close", listener: () => void): this;
57
+ off(event: "message", listener: (value: any) => void): this;
58
+ off(event: string | symbol, listener: (...args: any[]) => void): this;
59
+ }
60
+
61
+ interface WorkerOptions {
62
+ eval?: boolean | undefined;
63
+ env?: NodeJS.ProcessEnv | typeof SHARE_ENV | undefined;
64
+ workerData?: any;
65
+ stdin?: boolean | undefined;
66
+ stdout?: boolean | undefined;
67
+ stderr?: boolean | undefined;
68
+ execArgv?: string[] | undefined;
69
+ resourceLimits?: ResourceLimits | undefined;
70
+ /**
71
+ * Additional data to send in the first worker message.
72
+ */
73
+ transferList?: TransferListItem[] | undefined;
74
+ trackUnmanagedFds?: boolean | undefined;
75
+ }
76
+
77
+ interface ResourceLimits {
78
+ /**
79
+ * The maximum size of a heap space for recently created objects.
80
+ */
81
+ maxYoungGenerationSizeMb?: number | undefined;
82
+ /**
83
+ * The maximum size of the main heap in MB.
84
+ */
85
+ maxOldGenerationSizeMb?: number | undefined;
86
+ /**
87
+ * The size of a pre-allocated memory range used for generated code.
88
+ */
89
+ codeRangeSizeMb?: number | undefined;
90
+ /**
91
+ * The default maximum stack size for the thread. Small values may lead to unusable Worker instances.
92
+ * @default 4
93
+ */
94
+ stackSizeMb?: number | undefined;
95
+ }
96
+
97
+ class Worker extends EventEmitter {
98
+ readonly stdin: Writable | null;
99
+ readonly stdout: Readable;
100
+ readonly stderr: Readable;
101
+ readonly threadId: number;
102
+ readonly resourceLimits?: ResourceLimits | undefined;
103
+
104
+ constructor(filename: string, options?: WorkerOptions);
105
+
106
+ postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
107
+ ref(): void;
108
+ unref(): void;
109
+ /**
110
+ * Stop all JavaScript execution in the worker thread as soon as possible.
111
+ * Returns a Promise for the exit code that is fulfilled when the `exit` event is emitted.
112
+ */
113
+ terminate(): Promise<number>;
114
+
115
+ addListener(event: "error", listener: (err: Error) => void): this;
116
+ addListener(event: "exit", listener: (exitCode: number) => void): this;
117
+ addListener(event: "message", listener: (value: any) => void): this;
118
+ addListener(event: "messageerror", listener: (error: Error) => void): this;
119
+ addListener(event: "online", listener: () => void): this;
120
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
121
+
122
+ emit(event: "error", err: Error): boolean;
123
+ emit(event: "exit", exitCode: number): boolean;
124
+ emit(event: "message", value: any): boolean;
125
+ emit(event: "messageerror", error: Error): boolean;
126
+ emit(event: "online"): boolean;
127
+ emit(event: string | symbol, ...args: any[]): boolean;
128
+
129
+ on(event: "error", listener: (err: Error) => void): this;
130
+ on(event: "exit", listener: (exitCode: number) => void): this;
131
+ on(event: "message", listener: (value: any) => void): this;
132
+ on(event: "messageerror", listener: (error: Error) => void): this;
133
+ on(event: "online", listener: () => void): this;
134
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
135
+
136
+ once(event: "error", listener: (err: Error) => void): this;
137
+ once(event: "exit", listener: (exitCode: number) => void): this;
138
+ once(event: "message", listener: (value: any) => void): this;
139
+ once(event: "messageerror", listener: (error: Error) => void): this;
140
+ once(event: "online", listener: () => void): this;
141
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
142
+
143
+ prependListener(event: "error", listener: (err: Error) => void): this;
144
+ prependListener(event: "exit", listener: (exitCode: number) => void): this;
145
+ prependListener(event: "message", listener: (value: any) => void): this;
146
+ prependListener(event: "messageerror", listener: (error: Error) => void): this;
147
+ prependListener(event: "online", listener: () => void): this;
148
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
149
+
150
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
151
+ prependOnceListener(event: "exit", listener: (exitCode: number) => void): this;
152
+ prependOnceListener(event: "message", listener: (value: any) => void): this;
153
+ prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
154
+ prependOnceListener(event: "online", listener: () => void): this;
155
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
156
+
157
+ removeListener(event: "error", listener: (err: Error) => void): this;
158
+ removeListener(event: "exit", listener: (exitCode: number) => void): this;
159
+ removeListener(event: "message", listener: (value: any) => void): this;
160
+ removeListener(event: "messageerror", listener: (error: Error) => void): this;
161
+ removeListener(event: "online", listener: () => void): this;
162
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
163
+
164
+ off(event: "error", listener: (err: Error) => void): this;
165
+ off(event: "exit", listener: (exitCode: number) => void): this;
166
+ off(event: "message", listener: (value: any) => void): this;
167
+ off(event: "messageerror", listener: (error: Error) => void): this;
168
+ off(event: "online", listener: () => void): this;
169
+ off(event: string | symbol, listener: (...args: any[]) => void): this;
170
+ }
171
+
172
+ /**
173
+ * Mark an object as not transferable.
174
+ * If `object` occurs in the transfer list of a `port.postMessage()` call, it will be ignored.
175
+ *
176
+ * In particular, this makes sense for objects that can be cloned, rather than transferred,
177
+ * and which are used by other objects on the sending side. For example, Node.js marks
178
+ * the `ArrayBuffer`s it uses for its Buffer pool with this.
179
+ *
180
+ * This operation cannot be undone.
181
+ */
182
+ function markAsUntransferable(object: object): void;
183
+
184
+ /**
185
+ * Transfer a `MessagePort` to a different `vm` Context. The original `port`
186
+ * object will be rendered unusable, and the returned `MessagePort` instance will
187
+ * take its place.
188
+ *
189
+ * The returned `MessagePort` will be an object in the target context, and will
190
+ * inherit from its global `Object` class. Objects passed to the
191
+ * `port.onmessage()` listener will also be created in the target context
192
+ * and inherit from its global `Object` class.
193
+ *
194
+ * However, the created `MessagePort` will no longer inherit from
195
+ * `EventEmitter`, and only `port.onmessage()` can be used to receive
196
+ * events using it.
197
+ */
198
+ function moveMessagePortToContext(port: MessagePort, context: Context): MessagePort;
199
+
200
+ /**
201
+ * Receive a single message from a given `MessagePort`. If no message is available,
202
+ * `undefined` is returned, otherwise an object with a single `message` property
203
+ * that contains the message payload, corresponding to the oldest message in the
204
+ * `MessagePort`’s queue.
205
+ */
206
+ function receiveMessageOnPort(port: MessagePort): { message: any } | undefined;
207
+ }