@types/node 11.12.4 → 11.13.0
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/README.md +1 -1
- node/crypto.d.ts +1 -1
- node/events.d.ts +1 -0
- node/index.d.ts +1 -1
- node/package.json +2 -2
- node/tty.d.ts +3 -0
- node/v8.d.ts +22 -0
- node/worker_threads.d.ts +16 -0
node/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
|
|
9
9
|
|
|
10
10
|
Additional Details
|
|
11
|
-
* Last updated: Mon, 01 Apr 2019 19:
|
|
11
|
+
* Last updated: Mon, 01 Apr 2019 19:40: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/crypto.d.ts
CHANGED
|
@@ -261,7 +261,7 @@ declare module "crypto" {
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
function createPrivateKey(key: PrivateKeyInput | string | Buffer): KeyObject;
|
|
264
|
-
function createPublicKey(key: PublicKeyInput | string | Buffer): KeyObject;
|
|
264
|
+
function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject): KeyObject;
|
|
265
265
|
function createSecretKey(key: Buffer): KeyObject;
|
|
266
266
|
|
|
267
267
|
function createSign(algorithm: string, options?: stream.WritableOptions): Signer;
|
node/events.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ declare module "events" {
|
|
|
2
2
|
class internal extends NodeJS.EventEmitter { }
|
|
3
3
|
|
|
4
4
|
namespace internal {
|
|
5
|
+
function once(emitter: EventEmitter, event: string | symbol): Promise<any>;
|
|
5
6
|
class EventEmitter extends internal {
|
|
6
7
|
/** @deprecated since v4.0.0 */
|
|
7
8
|
static listenerCount(emitter: EventEmitter, event: string | symbol): number;
|
node/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for non-npm package Node.js 11.
|
|
1
|
+
// Type definitions for non-npm package Node.js 11.13
|
|
2
2
|
// Project: http://nodejs.org/
|
|
3
3
|
// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
|
|
4
4
|
// DefinitelyTyped <https://github.com/DefinitelyTyped>
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.13.0",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -206,6 +206,6 @@
|
|
|
206
206
|
},
|
|
207
207
|
"scripts": {},
|
|
208
208
|
"dependencies": {},
|
|
209
|
-
"typesPublisherContentHash": "
|
|
209
|
+
"typesPublisherContentHash": "f650903133b29f714d48239d0401ba23695ef6bdb390e447918ee3d997cb3350",
|
|
210
210
|
"typeScriptVersion": "2.0"
|
|
211
211
|
}
|
node/tty.d.ts
CHANGED
|
@@ -39,6 +39,9 @@ declare module "tty" {
|
|
|
39
39
|
* @default `process.env`
|
|
40
40
|
*/
|
|
41
41
|
getColorDepth(env?: {}): number;
|
|
42
|
+
hasColors(depth?: number): boolean;
|
|
43
|
+
hasColors(env?: {}): boolean;
|
|
44
|
+
hasColors(depth: number, env?: {}): boolean;
|
|
42
45
|
getWindowSize(): [number, number];
|
|
43
46
|
columns: number;
|
|
44
47
|
rows: number;
|
node/v8.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
declare module "v8" {
|
|
2
|
+
import { Readable } from "stream";
|
|
3
|
+
|
|
2
4
|
interface HeapSpaceInfo {
|
|
3
5
|
space_name: string;
|
|
4
6
|
space_size: number;
|
|
@@ -25,4 +27,24 @@ declare module "v8" {
|
|
|
25
27
|
function getHeapStatistics(): HeapInfo;
|
|
26
28
|
function getHeapSpaceStatistics(): HeapSpaceInfo[];
|
|
27
29
|
function setFlagsFromString(flags: string): void;
|
|
30
|
+
/**
|
|
31
|
+
* Generates a snapshot of the current V8 heap and returns a Readable
|
|
32
|
+
* Stream that may be used to read the JSON serialized representation.
|
|
33
|
+
* This conversation was marked as resolved by joyeecheung
|
|
34
|
+
* This JSON stream format is intended to be used with tools such as
|
|
35
|
+
* Chrome DevTools. The JSON schema is undocumented and specific to the
|
|
36
|
+
* V8 engine, and may change from one version of V8 to the next.
|
|
37
|
+
*/
|
|
38
|
+
function getHeapSnapshot(): Readable;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @param fileName The file path where the V8 heap snapshot is to be
|
|
43
|
+
* saved. If not specified, a file name with the pattern
|
|
44
|
+
* `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be
|
|
45
|
+
* generated, where `{pid}` will be the PID of the Node.js process,
|
|
46
|
+
* `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from
|
|
47
|
+
* the main Node.js thread or the id of a worker thread.
|
|
48
|
+
*/
|
|
49
|
+
function writeHeapSnapshot(fileName?: string): string;
|
|
28
50
|
}
|
node/worker_threads.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare module "worker_threads" {
|
|
2
|
+
import { Context } from "vm";
|
|
2
3
|
import { EventEmitter } from "events";
|
|
3
4
|
import { Readable, Writable } from "stream";
|
|
4
5
|
|
|
@@ -73,6 +74,21 @@ declare module "worker_threads" {
|
|
|
73
74
|
ref(): void;
|
|
74
75
|
unref(): void;
|
|
75
76
|
terminate(callback?: (err: Error, exitCode: number) => void): void;
|
|
77
|
+
/**
|
|
78
|
+
* Transfer a `MessagePort` to a different `vm` Context. The original `port`
|
|
79
|
+
* object will be rendered unusable, and the returned `MessagePort` instance will
|
|
80
|
+
* take its place.
|
|
81
|
+
*
|
|
82
|
+
* The returned `MessagePort` will be an object in the target context, and will
|
|
83
|
+
* inherit from its global `Object` class. Objects passed to the
|
|
84
|
+
* `port.onmessage()` listener will also be created in the target context
|
|
85
|
+
* and inherit from its global `Object` class.
|
|
86
|
+
*
|
|
87
|
+
* However, the created `MessagePort` will no longer inherit from
|
|
88
|
+
* `EventEmitter`, and only `port.onmessage()` can be used to receive
|
|
89
|
+
* events using it.
|
|
90
|
+
*/
|
|
91
|
+
moveMessagePortToContext(port: MessagePort, context: Context): MessagePort;
|
|
76
92
|
|
|
77
93
|
addListener(event: "error", listener: (err: Error) => void): this;
|
|
78
94
|
addListener(event: "exit", listener: (exitCode: number) => void): this;
|