@types/node 14.18.8 → 15.0.2
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 v14.18 → node}/LICENSE +0 -0
- node/README.md +16 -0
- node/assert/strict.d.ts +4 -0
- node v14.18/assert.d.ts → node/assert.d.ts +3 -7
- node v14.18/async_hooks.d.ts → node/async_hooks.d.ts +4 -7
- node/base.d.ts +19 -0
- node/buffer.d.ts +22 -0
- node v14.18/child_process.d.ts → node/child_process.d.ts +63 -67
- node v14.18/cluster.d.ts → node/cluster.d.ts +10 -13
- node v14.18/console.d.ts → node/console.d.ts +13 -22
- node v14.18/constants.d.ts → node/constants.d.ts +0 -5
- node v14.18/crypto.d.ts → node/crypto.d.ts +134 -53
- node v14.18/dgram.d.ts → node/dgram.d.ts +17 -20
- node/dns/promises.d.ts +97 -0
- node/dns.d.ts +322 -0
- node v14.18/domain.d.ts → node/domain.d.ts +0 -3
- node v14.18/events.d.ts → node/events.d.ts +8 -8
- node v14.18/fs/promises.d.ts → node/fs/promises.d.ts +18 -29
- node v14.18/fs.d.ts → node/fs.d.ts +77 -93
- node v14.18/globals.d.ts → node/globals.d.ts +60 -24
- {node v14.18 → node}/globals.global.d.ts +0 -0
- node v14.18/http.d.ts → node/http.d.ts +108 -176
- node v14.18/http2.d.ts → node/http2.d.ts +74 -71
- node/https.d.ts +36 -0
- node v14.18/index.d.ts → node/index.d.ts +15 -55
- node v14.18/inspector.d.ts → node/inspector.d.ts +151 -161
- node v14.18/module.d.ts → node/module.d.ts +0 -4
- node v14.18/net.d.ts → node/net.d.ts +70 -42
- node v14.18/os.d.ts → node/os.d.ts +0 -3
- node v14.18/package.json → node/package.json +25 -19
- node v14.18/path.d.ts → node/path.d.ts +5 -9
- node v14.18/perf_hooks.d.ts → node/perf_hooks.d.ts +5 -8
- node v14.18/process.d.ts → node/process.d.ts +53 -17
- node v14.18/punycode.d.ts → node/punycode.d.ts +0 -3
- node v14.18/querystring.d.ts → node/querystring.d.ts +3 -6
- node v14.18/readline.d.ts → node/readline.d.ts +14 -18
- node v14.18/repl.d.ts → node/repl.d.ts +17 -20
- node/stream/promises.d.ts +67 -0
- node v14.18/stream.d.ts → node/stream.d.ts +164 -60
- node v14.18/string_decoder.d.ts → node/string_decoder.d.ts +0 -3
- node/timers/promises.d.ts +13 -0
- node v14.18/timers.d.ts → node/timers.d.ts +16 -5
- node v14.18/tls.d.ts → node/tls.d.ts +51 -56
- node v14.18/trace_events.d.ts → node/trace_events.d.ts +0 -3
- node/ts3.6/assert.d.ts +98 -0
- node/ts3.6/base.d.ts +66 -0
- node/ts3.6/index.d.ts +7 -0
- node v14.18/tty.d.ts → node/tty.d.ts +0 -3
- node v14.18/url.d.ts → node/url.d.ts +16 -19
- node v14.18/util.d.ts → node/util.d.ts +3 -12
- node v14.18/v8.d.ts → node/v8.d.ts +0 -3
- node v14.18/vm.d.ts → node/vm.d.ts +25 -28
- node v14.18/wasi.d.ts → node/wasi.d.ts +7 -10
- node v14.18/worker_threads.d.ts → node/worker_threads.d.ts +18 -18
- node v14.18/zlib.d.ts → node/zlib.d.ts +16 -19
- node v14.18/README.md +0 -16
- node v14.18/buffer.d.ts +0 -89
- node v14.18/dns.d.ts +0 -387
- node v14.18/https.d.ts +0 -142
|
@@ -5,67 +5,67 @@ declare module 'vm' {
|
|
|
5
5
|
* Specifies the filename used in stack traces produced by this script.
|
|
6
6
|
* Default: `''`.
|
|
7
7
|
*/
|
|
8
|
-
filename?: string
|
|
8
|
+
filename?: string;
|
|
9
9
|
/**
|
|
10
10
|
* Specifies the line number offset that is displayed in stack traces produced by this script.
|
|
11
11
|
* Default: `0`.
|
|
12
12
|
*/
|
|
13
|
-
lineOffset?: number
|
|
13
|
+
lineOffset?: number;
|
|
14
14
|
/**
|
|
15
15
|
* Specifies the column number offset that is displayed in stack traces produced by this script.
|
|
16
|
-
*
|
|
16
|
+
* Default: `0`
|
|
17
17
|
*/
|
|
18
|
-
columnOffset?: number
|
|
18
|
+
columnOffset?: number;
|
|
19
19
|
}
|
|
20
20
|
interface ScriptOptions extends BaseOptions {
|
|
21
|
-
displayErrors?: boolean
|
|
22
|
-
timeout?: number
|
|
23
|
-
cachedData?: Buffer
|
|
21
|
+
displayErrors?: boolean;
|
|
22
|
+
timeout?: number;
|
|
23
|
+
cachedData?: Buffer;
|
|
24
24
|
/** @deprecated in favor of `script.createCachedData()` */
|
|
25
|
-
produceCachedData?: boolean
|
|
25
|
+
produceCachedData?: boolean;
|
|
26
26
|
}
|
|
27
27
|
interface RunningScriptOptions extends BaseOptions {
|
|
28
28
|
/**
|
|
29
29
|
* When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace.
|
|
30
30
|
* Default: `true`.
|
|
31
31
|
*/
|
|
32
|
-
displayErrors?: boolean
|
|
32
|
+
displayErrors?: boolean;
|
|
33
33
|
/**
|
|
34
34
|
* Specifies the number of milliseconds to execute code before terminating execution.
|
|
35
35
|
* If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer.
|
|
36
36
|
*/
|
|
37
|
-
timeout?: number
|
|
37
|
+
timeout?: number;
|
|
38
38
|
/**
|
|
39
39
|
* If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received.
|
|
40
40
|
* 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.
|
|
41
41
|
* If execution is terminated, an `Error` will be thrown.
|
|
42
42
|
* Default: `false`.
|
|
43
43
|
*/
|
|
44
|
-
breakOnSigint?: boolean
|
|
44
|
+
breakOnSigint?: boolean;
|
|
45
45
|
/**
|
|
46
46
|
* If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
|
|
47
47
|
*/
|
|
48
|
-
microtaskMode?: 'afterEvaluate'
|
|
48
|
+
microtaskMode?: 'afterEvaluate';
|
|
49
49
|
}
|
|
50
50
|
interface CompileFunctionOptions extends BaseOptions {
|
|
51
51
|
/**
|
|
52
52
|
* Provides an optional data with V8's code cache data for the supplied source.
|
|
53
53
|
*/
|
|
54
|
-
cachedData?: Buffer
|
|
54
|
+
cachedData?: Buffer;
|
|
55
55
|
/**
|
|
56
56
|
* Specifies whether to produce new cache data.
|
|
57
57
|
* Default: `false`,
|
|
58
58
|
*/
|
|
59
|
-
produceCachedData?: boolean
|
|
59
|
+
produceCachedData?: boolean;
|
|
60
60
|
/**
|
|
61
61
|
* The sandbox/context in which the said function should be compiled in.
|
|
62
62
|
*/
|
|
63
|
-
parsingContext?: Context
|
|
63
|
+
parsingContext?: Context;
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling
|
|
67
67
|
*/
|
|
68
|
-
contextExtensions?: Object[]
|
|
68
|
+
contextExtensions?: Object[];
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
interface CreateContextOptions {
|
|
@@ -73,7 +73,7 @@ declare module 'vm' {
|
|
|
73
73
|
* Human-readable name of the newly created context.
|
|
74
74
|
* @default 'VM Context i' Where i is an ascending numerical index of the created context.
|
|
75
75
|
*/
|
|
76
|
-
name?: string
|
|
76
|
+
name?: string;
|
|
77
77
|
/**
|
|
78
78
|
* Corresponds to the newly created context for display purposes.
|
|
79
79
|
* The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary),
|
|
@@ -81,24 +81,24 @@ declare module 'vm' {
|
|
|
81
81
|
* Most notably, this string should omit the trailing slash, as that denotes a path.
|
|
82
82
|
* @default ''
|
|
83
83
|
*/
|
|
84
|
-
origin?: string
|
|
84
|
+
origin?: string;
|
|
85
85
|
codeGeneration?: {
|
|
86
86
|
/**
|
|
87
87
|
* If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
|
|
88
88
|
* will throw an EvalError.
|
|
89
89
|
* @default true
|
|
90
90
|
*/
|
|
91
|
-
strings?: boolean
|
|
91
|
+
strings?: boolean;
|
|
92
92
|
/**
|
|
93
93
|
* If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
|
|
94
94
|
* @default true
|
|
95
95
|
*/
|
|
96
|
-
wasm?: boolean
|
|
97
|
-
}
|
|
96
|
+
wasm?: boolean;
|
|
97
|
+
};
|
|
98
98
|
/**
|
|
99
99
|
* If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
|
|
100
100
|
*/
|
|
101
|
-
microtaskMode?: 'afterEvaluate'
|
|
101
|
+
microtaskMode?: 'afterEvaluate';
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
type MeasureMemoryMode = 'summary' | 'detailed';
|
|
@@ -107,8 +107,8 @@ declare module 'vm' {
|
|
|
107
107
|
/**
|
|
108
108
|
* @default 'summary'
|
|
109
109
|
*/
|
|
110
|
-
mode?: MeasureMemoryMode
|
|
111
|
-
context?: Context
|
|
110
|
+
mode?: MeasureMemoryMode;
|
|
111
|
+
context?: Context;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
interface MemoryMeasurement {
|
|
@@ -124,7 +124,7 @@ declare module 'vm' {
|
|
|
124
124
|
runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any;
|
|
125
125
|
runInThisContext(options?: RunningScriptOptions): any;
|
|
126
126
|
createCachedData(): Buffer;
|
|
127
|
-
cachedDataRejected?: boolean
|
|
127
|
+
cachedDataRejected?: boolean;
|
|
128
128
|
}
|
|
129
129
|
function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
|
|
130
130
|
function isContext(sandbox: Context): boolean;
|
|
@@ -150,6 +150,3 @@ declare module 'vm' {
|
|
|
150
150
|
*/
|
|
151
151
|
function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
|
|
152
152
|
}
|
|
153
|
-
declare module 'node:vm' {
|
|
154
|
-
export * from 'vm';
|
|
155
|
-
}
|
|
@@ -5,13 +5,13 @@ declare module 'wasi' {
|
|
|
5
5
|
* see as command line arguments. The first argument is the virtual path to the
|
|
6
6
|
* WASI command itself.
|
|
7
7
|
*/
|
|
8
|
-
args?: string[]
|
|
8
|
+
args?: string[];
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* An object similar to `process.env` that the WebAssembly
|
|
12
12
|
* application will see as its environment.
|
|
13
13
|
*/
|
|
14
|
-
env?: object
|
|
14
|
+
env?: object;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* This object represents the WebAssembly application's
|
|
@@ -19,7 +19,7 @@ declare module 'wasi' {
|
|
|
19
19
|
* directories within the sandbox. The corresponding values in `preopens` are
|
|
20
20
|
* the real paths to those directories on the host machine.
|
|
21
21
|
*/
|
|
22
|
-
preopens?: NodeJS.Dict<string
|
|
22
|
+
preopens?: NodeJS.Dict<string>;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* By default, WASI applications terminate the Node.js
|
|
@@ -28,25 +28,25 @@ declare module 'wasi' {
|
|
|
28
28
|
* process.
|
|
29
29
|
* @default false
|
|
30
30
|
*/
|
|
31
|
-
returnOnExit?: boolean
|
|
31
|
+
returnOnExit?: boolean;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* The file descriptor used as standard input in the WebAssembly application.
|
|
35
35
|
* @default 0
|
|
36
36
|
*/
|
|
37
|
-
stdin?: number
|
|
37
|
+
stdin?: number;
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* The file descriptor used as standard output in the WebAssembly application.
|
|
41
41
|
* @default 1
|
|
42
42
|
*/
|
|
43
|
-
stdout?: number
|
|
43
|
+
stdout?: number;
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* The file descriptor used as standard error in the WebAssembly application.
|
|
47
47
|
* @default 2
|
|
48
48
|
*/
|
|
49
|
-
stderr?: number
|
|
49
|
+
stderr?: number;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
class WASI {
|
|
@@ -84,6 +84,3 @@ declare module 'wasi' {
|
|
|
84
84
|
readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
declare module 'node:wasi' {
|
|
88
|
-
export * from 'wasi';
|
|
89
|
-
}
|
|
@@ -74,40 +74,43 @@ declare module 'worker_threads' {
|
|
|
74
74
|
* but the values will be available on the global `process.argv` as if they
|
|
75
75
|
* were passed as CLI options to the script.
|
|
76
76
|
*/
|
|
77
|
-
argv?: any[]
|
|
78
|
-
env?: NodeJS.Dict<string> | typeof SHARE_ENV
|
|
79
|
-
eval?: boolean
|
|
77
|
+
argv?: any[];
|
|
78
|
+
env?: NodeJS.Dict<string> | typeof SHARE_ENV;
|
|
79
|
+
eval?: boolean;
|
|
80
80
|
workerData?: any;
|
|
81
|
-
stdin?: boolean
|
|
82
|
-
stdout?: boolean
|
|
83
|
-
stderr?: boolean
|
|
84
|
-
execArgv?: string[]
|
|
85
|
-
resourceLimits?: ResourceLimits
|
|
81
|
+
stdin?: boolean;
|
|
82
|
+
stdout?: boolean;
|
|
83
|
+
stderr?: boolean;
|
|
84
|
+
execArgv?: string[];
|
|
85
|
+
resourceLimits?: ResourceLimits;
|
|
86
86
|
/**
|
|
87
87
|
* Additional data to send in the first worker message.
|
|
88
88
|
*/
|
|
89
|
-
transferList?: TransferListItem[]
|
|
90
|
-
|
|
89
|
+
transferList?: TransferListItem[];
|
|
90
|
+
/**
|
|
91
|
+
* @default true
|
|
92
|
+
*/
|
|
93
|
+
trackUnmanagedFds?: boolean;
|
|
91
94
|
}
|
|
92
95
|
|
|
93
96
|
interface ResourceLimits {
|
|
94
97
|
/**
|
|
95
98
|
* The maximum size of a heap space for recently created objects.
|
|
96
99
|
*/
|
|
97
|
-
maxYoungGenerationSizeMb?: number
|
|
100
|
+
maxYoungGenerationSizeMb?: number;
|
|
98
101
|
/**
|
|
99
102
|
* The maximum size of the main heap in MB.
|
|
100
103
|
*/
|
|
101
|
-
maxOldGenerationSizeMb?: number
|
|
104
|
+
maxOldGenerationSizeMb?: number;
|
|
102
105
|
/**
|
|
103
106
|
* The size of a pre-allocated memory range used for generated code.
|
|
104
107
|
*/
|
|
105
|
-
codeRangeSizeMb?: number
|
|
108
|
+
codeRangeSizeMb?: number;
|
|
106
109
|
/**
|
|
107
110
|
* The default maximum stack size for the thread. Small values may lead to unusable Worker instances.
|
|
108
111
|
* @default 4
|
|
109
112
|
*/
|
|
110
|
-
stackSizeMb?: number
|
|
113
|
+
stackSizeMb?: number;
|
|
111
114
|
}
|
|
112
115
|
|
|
113
116
|
class Worker extends EventEmitter {
|
|
@@ -115,7 +118,7 @@ declare module 'worker_threads' {
|
|
|
115
118
|
readonly stdout: Readable;
|
|
116
119
|
readonly stderr: Readable;
|
|
117
120
|
readonly threadId: number;
|
|
118
|
-
readonly resourceLimits?: ResourceLimits
|
|
121
|
+
readonly resourceLimits?: ResourceLimits;
|
|
119
122
|
|
|
120
123
|
/**
|
|
121
124
|
* @param filename The path to the Worker’s main script or module.
|
|
@@ -236,6 +239,3 @@ declare module 'worker_threads' {
|
|
|
236
239
|
*/
|
|
237
240
|
function receiveMessageOnPort(port: MessagePort): { message: any } | undefined;
|
|
238
241
|
}
|
|
239
|
-
declare module 'node:worker_threads' {
|
|
240
|
-
export * from 'worker_threads';
|
|
241
|
-
}
|
|
@@ -5,51 +5,51 @@ declare module 'zlib' {
|
|
|
5
5
|
/**
|
|
6
6
|
* @default constants.Z_NO_FLUSH
|
|
7
7
|
*/
|
|
8
|
-
flush?: number
|
|
8
|
+
flush?: number;
|
|
9
9
|
/**
|
|
10
10
|
* @default constants.Z_FINISH
|
|
11
11
|
*/
|
|
12
|
-
finishFlush?: number
|
|
12
|
+
finishFlush?: number;
|
|
13
13
|
/**
|
|
14
14
|
* @default 16*1024
|
|
15
15
|
*/
|
|
16
|
-
chunkSize?: number
|
|
17
|
-
windowBits?: number
|
|
18
|
-
level?: number
|
|
19
|
-
memLevel?: number
|
|
20
|
-
strategy?: number
|
|
21
|
-
dictionary?: NodeJS.ArrayBufferView | ArrayBuffer
|
|
22
|
-
info?: boolean
|
|
23
|
-
maxOutputLength?: number
|
|
16
|
+
chunkSize?: number;
|
|
17
|
+
windowBits?: number;
|
|
18
|
+
level?: number; // compression only
|
|
19
|
+
memLevel?: number; // compression only
|
|
20
|
+
strategy?: number; // compression only
|
|
21
|
+
dictionary?: NodeJS.ArrayBufferView | ArrayBuffer; // deflate/inflate only, empty dictionary by default
|
|
22
|
+
info?: boolean;
|
|
23
|
+
maxOutputLength?: number;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
interface BrotliOptions {
|
|
27
27
|
/**
|
|
28
28
|
* @default constants.BROTLI_OPERATION_PROCESS
|
|
29
29
|
*/
|
|
30
|
-
flush?: number
|
|
30
|
+
flush?: number;
|
|
31
31
|
/**
|
|
32
32
|
* @default constants.BROTLI_OPERATION_FINISH
|
|
33
33
|
*/
|
|
34
|
-
finishFlush?: number
|
|
34
|
+
finishFlush?: number;
|
|
35
35
|
/**
|
|
36
36
|
* @default 16*1024
|
|
37
37
|
*/
|
|
38
|
-
chunkSize?: number
|
|
38
|
+
chunkSize?: number;
|
|
39
39
|
params?: {
|
|
40
40
|
/**
|
|
41
41
|
* Each key is a `constants.BROTLI_*` constant.
|
|
42
42
|
*/
|
|
43
43
|
[key: number]: boolean | number;
|
|
44
|
-
}
|
|
45
|
-
maxOutputLength?: number
|
|
44
|
+
};
|
|
45
|
+
maxOutputLength?: number;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
interface Zlib {
|
|
49
49
|
/** @deprecated Use bytesWritten instead. */
|
|
50
50
|
readonly bytesRead: number;
|
|
51
51
|
readonly bytesWritten: number;
|
|
52
|
-
shell?: boolean | string
|
|
52
|
+
shell?: boolean | string;
|
|
53
53
|
close(callback?: () => void): void;
|
|
54
54
|
flush(kind?: number, callback?: () => void): void;
|
|
55
55
|
flush(callback?: () => void): void;
|
|
@@ -359,6 +359,3 @@ declare module 'zlib' {
|
|
|
359
359
|
/** @deprecated */
|
|
360
360
|
const Z_DEFLATED: number;
|
|
361
361
|
}
|
|
362
|
-
declare module 'node:zlib' {
|
|
363
|
-
export * from 'zlib';
|
|
364
|
-
}
|
node v14.18/README.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Installation
|
|
2
|
-
> `npm install --save @types/node`
|
|
3
|
-
|
|
4
|
-
# Summary
|
|
5
|
-
This package contains type definitions for Node.js (https://nodejs.org/).
|
|
6
|
-
|
|
7
|
-
# Details
|
|
8
|
-
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v14.
|
|
9
|
-
|
|
10
|
-
### Additional Details
|
|
11
|
-
* Last updated: Tue, 18 Jan 2022 18:31:39 GMT
|
|
12
|
-
* Dependencies: none
|
|
13
|
-
* Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
|
-
|
|
15
|
-
# Credits
|
|
16
|
-
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Seth Westphal](https://github.com/westy92), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [Bond](https://github.com/bondz), and [Linus Unnebäck](https://github.com/LinusU).
|
node v14.18/buffer.d.ts
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
declare module 'buffer' {
|
|
2
|
-
import { BinaryLike } from 'node:crypto';
|
|
3
|
-
export const INSPECT_MAX_BYTES: number;
|
|
4
|
-
export const kMaxLength: number;
|
|
5
|
-
export const kStringMaxLength: number;
|
|
6
|
-
export const constants: {
|
|
7
|
-
MAX_LENGTH: number;
|
|
8
|
-
MAX_STRING_LENGTH: number;
|
|
9
|
-
};
|
|
10
|
-
const BuffType: typeof Buffer;
|
|
11
|
-
|
|
12
|
-
export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary";
|
|
13
|
-
|
|
14
|
-
export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
|
|
15
|
-
|
|
16
|
-
export const SlowBuffer: {
|
|
17
|
-
/** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
|
|
18
|
-
new(size: number): Buffer;
|
|
19
|
-
prototype: Buffer;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* @experimental
|
|
23
|
-
*/
|
|
24
|
-
export interface BlobOptions {
|
|
25
|
-
/**
|
|
26
|
-
* @default 'utf8'
|
|
27
|
-
*/
|
|
28
|
-
encoding?: BufferEncoding | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* The Blob content-type. The intent is for `type` to convey
|
|
31
|
-
* the MIME media type of the data, however no validation of the type format
|
|
32
|
-
* is performed.
|
|
33
|
-
*/
|
|
34
|
-
type?: string | undefined;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across
|
|
38
|
-
* multiple worker threads.
|
|
39
|
-
* @since v14.18.0
|
|
40
|
-
* @experimental
|
|
41
|
-
*/
|
|
42
|
-
export class Blob {
|
|
43
|
-
/**
|
|
44
|
-
* The total size of the `Blob` in bytes.
|
|
45
|
-
* @since v14.18.0
|
|
46
|
-
*/
|
|
47
|
-
readonly size: number;
|
|
48
|
-
/**
|
|
49
|
-
* The content-type of the `Blob`.
|
|
50
|
-
* @since v14.18.0
|
|
51
|
-
*/
|
|
52
|
-
readonly type: string;
|
|
53
|
-
/**
|
|
54
|
-
* Creates a new `Blob` object containing a concatenation of the given sources.
|
|
55
|
-
*
|
|
56
|
-
* {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into
|
|
57
|
-
* the 'Blob' and can therefore be safely modified after the 'Blob' is created.
|
|
58
|
-
*
|
|
59
|
-
* String sources are also copied into the `Blob`.
|
|
60
|
-
*/
|
|
61
|
-
constructor(sources: Array<BinaryLike | Blob>, options?: BlobOptions);
|
|
62
|
-
/**
|
|
63
|
-
* Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
|
|
64
|
-
* the `Blob` data.
|
|
65
|
-
* @since v14.18.0
|
|
66
|
-
*/
|
|
67
|
-
arrayBuffer(): Promise<ArrayBuffer>;
|
|
68
|
-
/**
|
|
69
|
-
* Creates and returns a new `Blob` containing a subset of this `Blob` objects
|
|
70
|
-
* data. The original `Blob` is not altered.
|
|
71
|
-
* @since v14.18.0
|
|
72
|
-
* @param start The starting index.
|
|
73
|
-
* @param end The ending index.
|
|
74
|
-
* @param type The content-type for the new `Blob`
|
|
75
|
-
*/
|
|
76
|
-
slice(start?: number, end?: number, type?: string): Blob;
|
|
77
|
-
/**
|
|
78
|
-
* Returns a promise that fulfills with the contents of the `Blob` decoded as a
|
|
79
|
-
* UTF-8 string.
|
|
80
|
-
* @since v14.18.0
|
|
81
|
-
*/
|
|
82
|
-
text(): Promise<string>;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export { BuffType as Buffer };
|
|
86
|
-
}
|
|
87
|
-
declare module 'node:buffer' {
|
|
88
|
-
export * from 'buffer';
|
|
89
|
-
}
|