@types/node 12.12.35 → 12.12.39
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.
- node v12.12/LICENSE +21 -21
- node v12.12/README.md +1 -1
- node v12.12/assert.d.ts +8 -4
- node v12.12/base.d.ts +0 -1
- node v12.12/child_process.d.ts +5 -1
- node v12.12/index.d.ts +3 -0
- node v12.12/package.json +8 -3
- node v12.12/stream.d.ts +7 -1
- node v12.12/ts3.2/base.d.ts +22 -0
- node v12.12/ts3.2/index.d.ts +4 -12
- node v12.12/ts3.7/assert.d.ts +52 -0
- node v12.12/ts3.7/base.d.ts +20 -0
- node v12.12/ts3.7/index.d.ts +5 -0
- node v12.12/worker_threads.d.ts +24 -23
node v12.12/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE
|
node v12.12/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (http://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v12.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Wed,
|
|
11
|
+
* Last updated: Wed, 13 May 2020 00:31:47 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Buffer`, `NodeJS`, `Symbol`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
14
|
|
node v12.12/assert.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare module "assert" {
|
|
2
|
-
function
|
|
3
|
-
namespace
|
|
2
|
+
function assert(value: any, message?: string | Error): void;
|
|
3
|
+
namespace assert {
|
|
4
4
|
class AssertionError implements Error {
|
|
5
5
|
name: string;
|
|
6
6
|
message: string;
|
|
@@ -20,9 +20,13 @@ declare module "assert" {
|
|
|
20
20
|
/** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
|
|
21
21
|
function fail(actual: any, expected: any, message?: string | Error, operator?: string, stackStartFn?: Function): never;
|
|
22
22
|
function ok(value: any, message?: string | Error): void;
|
|
23
|
+
/** @deprecated since v9.9.0 - use strictEqual() instead. */
|
|
23
24
|
function equal(actual: any, expected: any, message?: string | Error): void;
|
|
25
|
+
/** @deprecated since v9.9.0 - use notStrictEqual() instead. */
|
|
24
26
|
function notEqual(actual: any, expected: any, message?: string | Error): void;
|
|
27
|
+
/** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
|
|
25
28
|
function deepEqual(actual: any, expected: any, message?: string | Error): void;
|
|
29
|
+
/** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
|
|
26
30
|
function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
|
|
27
31
|
function strictEqual(actual: any, expected: any, message?: string | Error): void;
|
|
28
32
|
function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
|
|
@@ -41,8 +45,8 @@ declare module "assert" {
|
|
|
41
45
|
function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
|
|
42
46
|
function doesNotReject(block: (() => Promise<any>) | Promise<any>, error: RegExp | Function, message?: string | Error): Promise<void>;
|
|
43
47
|
|
|
44
|
-
const strict: typeof
|
|
48
|
+
const strict: typeof assert;
|
|
45
49
|
}
|
|
46
50
|
|
|
47
|
-
export =
|
|
51
|
+
export = assert;
|
|
48
52
|
}
|
node v12.12/base.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// base definnitions for all NodeJS modules that are not specific to any version of TypeScript
|
|
2
2
|
/// <reference path="globals.d.ts" />
|
|
3
|
-
/// <reference path="assert.d.ts" />
|
|
4
3
|
/// <reference path="async_hooks.d.ts" />
|
|
5
4
|
/// <reference path="buffer.d.ts" />
|
|
6
5
|
/// <reference path="child_process.d.ts" />
|
node v12.12/child_process.d.ts
CHANGED
|
@@ -18,7 +18,11 @@ declare module "child_process" {
|
|
|
18
18
|
readonly killed: boolean;
|
|
19
19
|
readonly pid: number;
|
|
20
20
|
readonly connected: boolean;
|
|
21
|
-
|
|
21
|
+
readonly exitCode: number | null;
|
|
22
|
+
readonly signalCode: number | null;
|
|
23
|
+
readonly spawnargs: string[];
|
|
24
|
+
readonly spawnfile: string;
|
|
25
|
+
kill(signal?: NodeJS.Signals | number): boolean;
|
|
22
26
|
send(message: any, callback?: (error: Error | null) => void): boolean;
|
|
23
27
|
send(message: any, sendHandle?: net.Socket | net.Server, callback?: (error: Error | null) => void): boolean;
|
|
24
28
|
send(message: any, sendHandle?: net.Socket | net.Server, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
|
node v12.12/index.d.ts
CHANGED
|
@@ -58,6 +58,9 @@
|
|
|
58
58
|
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
|
|
59
59
|
/// <reference path="base.d.ts" />
|
|
60
60
|
|
|
61
|
+
// We can't include assert.d.ts in base.d.ts, as it'll cause duplication errors in +ts3.7
|
|
62
|
+
/// <reference path="assert.d.ts" />
|
|
63
|
+
|
|
61
64
|
// TypeScript 2.1-specific augmentations:
|
|
62
65
|
|
|
63
66
|
// Forward-declarations for needed types from es2015 and later (in case users are using `--lib es5`)
|
node v12.12/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "12.12.
|
|
3
|
+
"version": "12.12.39",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -218,6 +218,11 @@
|
|
|
218
218
|
"main": "",
|
|
219
219
|
"types": "index.d.ts",
|
|
220
220
|
"typesVersions": {
|
|
221
|
+
">=3.7.0-0": {
|
|
222
|
+
"*": [
|
|
223
|
+
"ts3.7/*"
|
|
224
|
+
]
|
|
225
|
+
},
|
|
221
226
|
">=3.2.0-0": {
|
|
222
227
|
"*": [
|
|
223
228
|
"ts3.2/*"
|
|
@@ -231,6 +236,6 @@
|
|
|
231
236
|
},
|
|
232
237
|
"scripts": {},
|
|
233
238
|
"dependencies": {},
|
|
234
|
-
"typesPublisherContentHash": "
|
|
235
|
-
"typeScriptVersion": "2.
|
|
239
|
+
"typesPublisherContentHash": "c8bad94901ed055411bd066cf63b334fb6bcc85fa7804ff7008c06d21f7f7b6e",
|
|
240
|
+
"typeScriptVersion": "2.9"
|
|
236
241
|
}
|
node v12.12/stream.d.ts
CHANGED
|
@@ -262,9 +262,15 @@ declare module "stream" {
|
|
|
262
262
|
|
|
263
263
|
class PassThrough extends Transform { }
|
|
264
264
|
|
|
265
|
+
interface FinishedOptions {
|
|
266
|
+
error?: boolean;
|
|
267
|
+
readable?: boolean;
|
|
268
|
+
writable?: boolean;
|
|
269
|
+
}
|
|
270
|
+
function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options: FinishedOptions, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
|
|
265
271
|
function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
|
|
266
272
|
namespace finished {
|
|
267
|
-
function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream): Promise<void>;
|
|
273
|
+
function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
|
|
268
274
|
}
|
|
269
275
|
|
|
270
276
|
function pipeline<T extends NodeJS.WritableStream>(stream1: NodeJS.ReadableStream, stream2: T, callback?: (err: NodeJS.ErrnoException | null) => void): T;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// NOTE: These definitions support NodeJS and TypeScript 3.2.
|
|
2
|
+
|
|
3
|
+
// NOTE: TypeScript version-specific augmentations can be found in the following paths:
|
|
4
|
+
// - ~/base.d.ts - Shared definitions common to all TypeScript versions
|
|
5
|
+
// - ~/index.d.ts - Definitions specific to TypeScript 2.1
|
|
6
|
+
// - ~/ts3.2/base.d.ts - Definitions specific to TypeScript 3.2
|
|
7
|
+
// - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2 with assert pulled in
|
|
8
|
+
|
|
9
|
+
// Reference required types from the default lib:
|
|
10
|
+
/// <reference lib="es2018" />
|
|
11
|
+
/// <reference lib="esnext.asynciterable" />
|
|
12
|
+
/// <reference lib="esnext.intl" />
|
|
13
|
+
/// <reference lib="esnext.bigint" />
|
|
14
|
+
|
|
15
|
+
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
|
|
16
|
+
// tslint:disable-next-line:no-bad-reference
|
|
17
|
+
/// <reference path="../base.d.ts" />
|
|
18
|
+
|
|
19
|
+
// TypeScript 3.2-specific augmentations:
|
|
20
|
+
/// <reference path="fs.d.ts" />
|
|
21
|
+
/// <reference path="util.d.ts" />
|
|
22
|
+
/// <reference path="globals.d.ts" />
|
node v12.12/ts3.2/index.d.ts
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
// NOTE: These definitions support NodeJS and TypeScript 3.2.
|
|
2
|
+
// This is requried to enable typing assert in ts3.7 without causing errors
|
|
3
|
+
// Typically type modifiations should be made in base.d.ts instead of here
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
/// <reference lib="es2018" />
|
|
5
|
-
/// <reference lib="esnext.asynciterable" />
|
|
6
|
-
/// <reference lib="esnext.intl" />
|
|
7
|
-
/// <reference lib="esnext.bigint" />
|
|
5
|
+
/// <reference path="base.d.ts" />
|
|
8
6
|
|
|
9
|
-
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
|
|
10
7
|
// tslint:disable-next-line:no-bad-reference
|
|
11
|
-
/// <reference path="../
|
|
12
|
-
|
|
13
|
-
// TypeScript 3.2-specific augmentations:
|
|
14
|
-
/// <reference path="fs.d.ts" />
|
|
15
|
-
/// <reference path="util.d.ts" />
|
|
16
|
-
/// <reference path="globals.d.ts" />
|
|
8
|
+
/// <reference path="../assert.d.ts" />
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
declare module "assert" {
|
|
2
|
+
function assert(value: any, message?: string | Error): asserts value;
|
|
3
|
+
namespace assert {
|
|
4
|
+
class AssertionError implements Error {
|
|
5
|
+
name: string;
|
|
6
|
+
message: string;
|
|
7
|
+
actual: any;
|
|
8
|
+
expected: any;
|
|
9
|
+
operator: string;
|
|
10
|
+
generatedMessage: boolean;
|
|
11
|
+
code: 'ERR_ASSERTION';
|
|
12
|
+
|
|
13
|
+
constructor(options?: {
|
|
14
|
+
message?: string; actual?: any; expected?: any;
|
|
15
|
+
operator?: string; stackStartFn?: Function
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function fail(message?: string | Error): never;
|
|
20
|
+
/** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
|
|
21
|
+
function fail(actual: any, expected: any, message?: string | Error, operator?: string, stackStartFn?: Function): never;
|
|
22
|
+
function ok(value: any, message?: string | Error): asserts value;
|
|
23
|
+
/** @deprecated since v9.9.0 - use strictEqual() instead. */
|
|
24
|
+
function equal(actual: any, expected: any, message?: string | Error): void;
|
|
25
|
+
/** @deprecated since v9.9.0 - use notStrictEqual() instead. */
|
|
26
|
+
function notEqual(actual: any, expected: any, message?: string | Error): void;
|
|
27
|
+
/** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
|
|
28
|
+
function deepEqual(actual: any, expected: any, message?: string | Error): void;
|
|
29
|
+
/** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
|
|
30
|
+
function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
|
|
31
|
+
function strictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
|
|
32
|
+
function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
|
|
33
|
+
function deepStrictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
|
|
34
|
+
function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
|
|
35
|
+
|
|
36
|
+
function throws(block: () => any, message?: string | Error): void;
|
|
37
|
+
function throws(block: () => any, error: RegExp | Function | Object | Error, message?: string | Error): void;
|
|
38
|
+
function doesNotThrow(block: () => any, message?: string | Error): void;
|
|
39
|
+
function doesNotThrow(block: () => any, error: RegExp | Function, message?: string | Error): void;
|
|
40
|
+
|
|
41
|
+
function ifError(value: any): asserts value is null | undefined;
|
|
42
|
+
|
|
43
|
+
function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
|
|
44
|
+
function rejects(block: (() => Promise<any>) | Promise<any>, error: RegExp | Function | Object | Error, message?: string | Error): Promise<void>;
|
|
45
|
+
function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
|
|
46
|
+
function doesNotReject(block: (() => Promise<any>) | Promise<any>, error: RegExp | Function, message?: string | Error): Promise<void>;
|
|
47
|
+
|
|
48
|
+
const strict: typeof assert;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export = assert;
|
|
52
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// NOTE: These definitions support NodeJS and TypeScript 3.7.
|
|
2
|
+
|
|
3
|
+
// NOTE: TypeScript version-specific augmentations can be found in the following paths:
|
|
4
|
+
// - ~/base.d.ts - Shared definitions common to all TypeScript versions
|
|
5
|
+
// - ~/index.d.ts - Definitions specific to TypeScript 2.1
|
|
6
|
+
// - ~/ts3.7/base.d.ts - Definitions specific to TypeScript 3.7
|
|
7
|
+
// - ~/ts3.7/index.d.ts - Definitions specific to TypeScript 3.7 with assert pulled in
|
|
8
|
+
|
|
9
|
+
// Reference required types from the default lib:
|
|
10
|
+
/// <reference lib="es2018" />
|
|
11
|
+
/// <reference lib="esnext.asynciterable" />
|
|
12
|
+
/// <reference lib="esnext.intl" />
|
|
13
|
+
/// <reference lib="esnext.bigint" />
|
|
14
|
+
|
|
15
|
+
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
|
|
16
|
+
// tslint:disable-next-line:no-bad-reference
|
|
17
|
+
/// <reference path="../ts3.2/base.d.ts" />
|
|
18
|
+
|
|
19
|
+
// TypeScript 3.7-specific augmentations:
|
|
20
|
+
/// <reference path="assert.d.ts" />
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// NOTE: These definitions support NodeJS and TypeScript 3.7.
|
|
2
|
+
// This isn't strictly needed since 3.7 has the assert module, but this way we're consistent.
|
|
3
|
+
// Typically type modificatons should be made in base.d.ts instead of here
|
|
4
|
+
|
|
5
|
+
/// <reference path="base.d.ts" />
|
node v12.12/worker_threads.d.ts
CHANGED
|
@@ -80,29 +80,6 @@ declare module "worker_threads" {
|
|
|
80
80
|
* Returns a Promise for the exit code that is fulfilled when the `exit` event is emitted.
|
|
81
81
|
*/
|
|
82
82
|
terminate(): Promise<number>;
|
|
83
|
-
/**
|
|
84
|
-
* Transfer a `MessagePort` to a different `vm` Context. The original `port`
|
|
85
|
-
* object will be rendered unusable, and the returned `MessagePort` instance will
|
|
86
|
-
* take its place.
|
|
87
|
-
*
|
|
88
|
-
* The returned `MessagePort` will be an object in the target context, and will
|
|
89
|
-
* inherit from its global `Object` class. Objects passed to the
|
|
90
|
-
* `port.onmessage()` listener will also be created in the target context
|
|
91
|
-
* and inherit from its global `Object` class.
|
|
92
|
-
*
|
|
93
|
-
* However, the created `MessagePort` will no longer inherit from
|
|
94
|
-
* `EventEmitter`, and only `port.onmessage()` can be used to receive
|
|
95
|
-
* events using it.
|
|
96
|
-
*/
|
|
97
|
-
moveMessagePortToContext(port: MessagePort, context: Context): MessagePort;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Receive a single message from a given `MessagePort`. If no message is available,
|
|
101
|
-
* `undefined` is returned, otherwise an object with a single `message` property
|
|
102
|
-
* that contains the message payload, corresponding to the oldest message in the
|
|
103
|
-
* `MessagePort`’s queue.
|
|
104
|
-
*/
|
|
105
|
-
receiveMessageOnPort(port: MessagePort): {} | undefined;
|
|
106
83
|
|
|
107
84
|
addListener(event: "error", listener: (err: Error) => void): this;
|
|
108
85
|
addListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
@@ -152,4 +129,28 @@ declare module "worker_threads" {
|
|
|
152
129
|
off(event: "online", listener: () => void): this;
|
|
153
130
|
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
154
131
|
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Transfer a `MessagePort` to a different `vm` Context. The original `port`
|
|
135
|
+
* object will be rendered unusable, and the returned `MessagePort` instance will
|
|
136
|
+
* take its place.
|
|
137
|
+
*
|
|
138
|
+
* The returned `MessagePort` will be an object in the target context, and will
|
|
139
|
+
* inherit from its global `Object` class. Objects passed to the
|
|
140
|
+
* `port.onmessage()` listener will also be created in the target context
|
|
141
|
+
* and inherit from its global `Object` class.
|
|
142
|
+
*
|
|
143
|
+
* However, the created `MessagePort` will no longer inherit from
|
|
144
|
+
* `EventEmitter`, and only `port.onmessage()` can be used to receive
|
|
145
|
+
* events using it.
|
|
146
|
+
*/
|
|
147
|
+
function moveMessagePortToContext(port: MessagePort, context: Context): MessagePort;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Receive a single message from a given `MessagePort`. If no message is available,
|
|
151
|
+
* `undefined` is returned, otherwise an object with a single `message` property
|
|
152
|
+
* that contains the message payload, corresponding to the oldest message in the
|
|
153
|
+
* `MessagePort`’s queue.
|
|
154
|
+
*/
|
|
155
|
+
function receiveMessageOnPort(port: MessagePort): { message: any } | undefined;
|
|
155
156
|
}
|