@types/node 16.11.47 → 16.11.50
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 v16.11/README.md +1 -1
- node v16.11/fs/promises.d.ts +18 -15
- node v16.11/globals.d.ts +23 -0
- node v16.11/package.json +2 -2
- node v16.11/perf_hooks.d.ts +29 -0
node v16.11/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v16.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Fri, 19 Aug 2022 18:02:31 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
|
|
14
14
|
|
node v16.11/fs/promises.d.ts
CHANGED
|
@@ -12,27 +12,28 @@ declare module 'fs/promises' {
|
|
|
12
12
|
import { Abortable } from 'node:events';
|
|
13
13
|
import { Stream } from 'node:stream';
|
|
14
14
|
import {
|
|
15
|
-
Stats,
|
|
16
15
|
BigIntStats,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
PathLike,
|
|
21
|
-
RmDirOptions,
|
|
22
|
-
RmOptions,
|
|
23
|
-
MakeDirectoryOptions,
|
|
24
|
-
Dirent,
|
|
25
|
-
OpenDirOptions,
|
|
16
|
+
BufferEncodingOption,
|
|
17
|
+
constants as fsConstants,
|
|
18
|
+
CopyOptions,
|
|
26
19
|
Dir,
|
|
20
|
+
Dirent,
|
|
21
|
+
MakeDirectoryOptions,
|
|
22
|
+
Mode,
|
|
27
23
|
ObjectEncodingOptions,
|
|
28
|
-
|
|
24
|
+
OpenDirOptions,
|
|
29
25
|
OpenMode,
|
|
30
|
-
|
|
31
|
-
WatchOptions,
|
|
32
|
-
WatchEventType,
|
|
33
|
-
CopyOptions,
|
|
26
|
+
PathLike,
|
|
34
27
|
ReadStream,
|
|
28
|
+
ReadVResult,
|
|
29
|
+
RmDirOptions,
|
|
30
|
+
RmOptions,
|
|
31
|
+
StatOptions,
|
|
32
|
+
Stats,
|
|
33
|
+
WatchEventType,
|
|
34
|
+
WatchOptions,
|
|
35
35
|
WriteStream,
|
|
36
|
+
WriteVResult,
|
|
36
37
|
} from 'node:fs';
|
|
37
38
|
interface FileChangeInfo<T extends string | Buffer> {
|
|
38
39
|
eventType: WatchEventType;
|
|
@@ -405,6 +406,8 @@ declare module 'fs/promises' {
|
|
|
405
406
|
*/
|
|
406
407
|
close(): Promise<void>;
|
|
407
408
|
}
|
|
409
|
+
|
|
410
|
+
const constants: typeof fsConstants;
|
|
408
411
|
/**
|
|
409
412
|
* Tests a user's permissions for the file or directory specified by `path`.
|
|
410
413
|
* The `mode` argument is an optional integer that specifies the accessibility
|
node v16.11/globals.d.ts
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
|
+
// Error extensions
|
|
2
|
+
interface Error {
|
|
3
|
+
/**
|
|
4
|
+
* If present, the `error.cause` property is the underlying cause of the `Error`.
|
|
5
|
+
* It is used when catching an error and throwing a new one with a different message or code in order to still have access to the original error.
|
|
6
|
+
* @added v16.9.0
|
|
7
|
+
*/
|
|
8
|
+
cause?: unknown;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @added v16.9.0
|
|
13
|
+
*/
|
|
14
|
+
interface ErrorOptions {
|
|
15
|
+
/**
|
|
16
|
+
* The error that caused the newly created error.
|
|
17
|
+
* @added v16.9.0
|
|
18
|
+
*/
|
|
19
|
+
cause?: unknown;
|
|
20
|
+
}
|
|
21
|
+
|
|
1
22
|
// Declare "static" methods in Error
|
|
2
23
|
interface ErrorConstructor {
|
|
24
|
+
new(message?: string, options?: ErrorOptions): Error;
|
|
25
|
+
(message?: string, options?: ErrorOptions): Error;
|
|
3
26
|
/** Create .stack property on a target object */
|
|
4
27
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
5
28
|
|
node v16.11/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "16.11.
|
|
3
|
+
"version": "16.11.50",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -220,6 +220,6 @@
|
|
|
220
220
|
},
|
|
221
221
|
"scripts": {},
|
|
222
222
|
"dependencies": {},
|
|
223
|
-
"typesPublisherContentHash": "
|
|
223
|
+
"typesPublisherContentHash": "2f7ee1ad4c3b97e0d15203fd68ff9e47f725bd5b582f655961998a6cbb102e29",
|
|
224
224
|
"typeScriptVersion": "4.0"
|
|
225
225
|
}
|
node v16.11/perf_hooks.d.ts
CHANGED
|
@@ -191,6 +191,35 @@ declare module 'perf_hooks' {
|
|
|
191
191
|
* @param name
|
|
192
192
|
*/
|
|
193
193
|
clearMarks(name?: string): void;
|
|
194
|
+
/**
|
|
195
|
+
* If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline.
|
|
196
|
+
* If name is provided, removes only the named measure.
|
|
197
|
+
* @param name
|
|
198
|
+
* @since v16.7.0
|
|
199
|
+
*/
|
|
200
|
+
clearMeasures(name?: string): void;
|
|
201
|
+
/**
|
|
202
|
+
* Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`.
|
|
203
|
+
* If you are only interested in performance entries of certain types or that have certain names, see
|
|
204
|
+
* `performance.getEntriesByType()` and `performance.getEntriesByName()`.
|
|
205
|
+
* @since v16.7.0
|
|
206
|
+
*/
|
|
207
|
+
getEntries(): PerformanceEntry[];
|
|
208
|
+
/**
|
|
209
|
+
* Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`
|
|
210
|
+
* whose `performanceEntry.name` is equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to `type`.
|
|
211
|
+
* @param name
|
|
212
|
+
* @param type
|
|
213
|
+
* @since v16.7.0
|
|
214
|
+
*/
|
|
215
|
+
getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
|
|
216
|
+
/**
|
|
217
|
+
* Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`
|
|
218
|
+
* whose `performanceEntry.entryType` is equal to `type`.
|
|
219
|
+
* @param type
|
|
220
|
+
* @since v16.7.0
|
|
221
|
+
*/
|
|
222
|
+
getEntriesByType(type: EntryType): PerformanceEntry[];
|
|
194
223
|
/**
|
|
195
224
|
* Creates a new PerformanceMark entry in the Performance Timeline.
|
|
196
225
|
* A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark',
|