@types/node 16.11.45 → 16.11.48
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.d.ts +16 -7
- node v16.11/package.json +2 -2
- node v16.11/path.d.ts +30 -19
- 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: Fri,
|
|
11
|
+
* Last updated: Fri, 12 Aug 2022 05:32:14 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.d.ts
CHANGED
|
@@ -3723,7 +3723,7 @@ declare module 'fs' {
|
|
|
3723
3723
|
export interface StatSyncOptions extends StatOptions {
|
|
3724
3724
|
throwIfNoEntry?: boolean | undefined;
|
|
3725
3725
|
}
|
|
3726
|
-
|
|
3726
|
+
interface CopyOptionsBase {
|
|
3727
3727
|
/**
|
|
3728
3728
|
* Dereference symlinks
|
|
3729
3729
|
* @default false
|
|
@@ -3735,11 +3735,6 @@ declare module 'fs' {
|
|
|
3735
3735
|
* @default false
|
|
3736
3736
|
*/
|
|
3737
3737
|
errorOnExist?: boolean;
|
|
3738
|
-
/**
|
|
3739
|
-
* Function to filter copied files/directories. Return
|
|
3740
|
-
* `true` to copy the item, `false` to ignore it.
|
|
3741
|
-
*/
|
|
3742
|
-
filter?(source: string, destination: string): boolean;
|
|
3743
3738
|
/**
|
|
3744
3739
|
* Overwrite existing file or directory. _The copy
|
|
3745
3740
|
* operation will ignore errors if you set this to false and the destination
|
|
@@ -3759,6 +3754,20 @@ declare module 'fs' {
|
|
|
3759
3754
|
*/
|
|
3760
3755
|
recursive?: boolean;
|
|
3761
3756
|
}
|
|
3757
|
+
export interface CopyOptions extends CopyOptionsBase {
|
|
3758
|
+
/**
|
|
3759
|
+
* Function to filter copied files/directories. Return
|
|
3760
|
+
* `true` to copy the item, `false` to ignore it.
|
|
3761
|
+
*/
|
|
3762
|
+
filter?(source: string, destination: string): boolean | Promise<boolean>;
|
|
3763
|
+
}
|
|
3764
|
+
export interface CopySyncOptions extends CopyOptionsBase {
|
|
3765
|
+
/**
|
|
3766
|
+
* Function to filter copied files/directories. Return
|
|
3767
|
+
* `true` to copy the item, `false` to ignore it.
|
|
3768
|
+
*/
|
|
3769
|
+
filter?(source: string, destination: string): boolean;
|
|
3770
|
+
}
|
|
3762
3771
|
/**
|
|
3763
3772
|
* Asynchronously copies the entire directory structure from `src` to `dest`,
|
|
3764
3773
|
* including subdirectories and files.
|
|
@@ -3783,7 +3792,7 @@ declare module 'fs' {
|
|
|
3783
3792
|
* @param src source path to copy.
|
|
3784
3793
|
* @param dest destination path to copy to.
|
|
3785
3794
|
*/
|
|
3786
|
-
export function cpSync(source: string | URL, destination: string | URL, opts?:
|
|
3795
|
+
export function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void;
|
|
3787
3796
|
}
|
|
3788
3797
|
declare module 'node:fs' {
|
|
3789
3798
|
export * from 'fs';
|
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.48",
|
|
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": "da525b4d244ca7d87aad2a54ff8b7ac12b417bdb3dc5593bb467f870d42ff60e",
|
|
224
224
|
"typeScriptVersion": "4.0"
|
|
225
225
|
}
|
node v16.11/path.d.ts
CHANGED
|
@@ -69,18 +69,19 @@ declare module 'path' {
|
|
|
69
69
|
* Normalize a string path, reducing '..' and '.' parts.
|
|
70
70
|
* When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
|
|
71
71
|
*
|
|
72
|
-
* @param
|
|
72
|
+
* @param path string path to normalize.
|
|
73
|
+
* @throws {TypeError} if `path` is not a string.
|
|
73
74
|
*/
|
|
74
|
-
normalize(
|
|
75
|
+
normalize(path: string): string;
|
|
75
76
|
/**
|
|
76
77
|
* Join all arguments together and normalize the resulting path.
|
|
77
|
-
* Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
|
|
78
78
|
*
|
|
79
79
|
* @param paths paths to join.
|
|
80
|
+
* @throws {TypeError} if any of the path segments is not a string.
|
|
80
81
|
*/
|
|
81
82
|
join(...paths: string[]): string;
|
|
82
83
|
/**
|
|
83
|
-
* The right-most parameter is considered {to}.
|
|
84
|
+
* The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
|
|
84
85
|
*
|
|
85
86
|
* Starting from leftmost {from} parameter, resolves {to} to an absolute path.
|
|
86
87
|
*
|
|
@@ -89,41 +90,50 @@ declare module 'path' {
|
|
|
89
90
|
* the current working directory is used as well. The resulting path is normalized,
|
|
90
91
|
* and trailing slashes are removed unless the path gets resolved to the root directory.
|
|
91
92
|
*
|
|
92
|
-
* @param
|
|
93
|
+
* @param paths string paths to join.
|
|
94
|
+
* @throws {TypeError} if any of the arguments is not a string.
|
|
93
95
|
*/
|
|
94
|
-
resolve(...
|
|
96
|
+
resolve(...paths: string[]): string;
|
|
95
97
|
/**
|
|
96
98
|
* Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
|
|
97
99
|
*
|
|
100
|
+
* If the given {path} is a zero-length string, `false` will be returned.
|
|
101
|
+
*
|
|
98
102
|
* @param path path to test.
|
|
103
|
+
* @throws {TypeError} if `path` is not a string.
|
|
99
104
|
*/
|
|
100
|
-
isAbsolute(
|
|
105
|
+
isAbsolute(path: string): boolean;
|
|
101
106
|
/**
|
|
102
|
-
* Solve the relative path from {from} to {to}.
|
|
107
|
+
* Solve the relative path from {from} to {to} based on the current working directory.
|
|
103
108
|
* At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
|
|
109
|
+
*
|
|
110
|
+
* @throws {TypeError} if either `from` or `to` is not a string.
|
|
104
111
|
*/
|
|
105
112
|
relative(from: string, to: string): string;
|
|
106
113
|
/**
|
|
107
114
|
* Return the directory name of a path. Similar to the Unix dirname command.
|
|
108
115
|
*
|
|
109
|
-
* @param
|
|
116
|
+
* @param path the path to evaluate.
|
|
117
|
+
* @throws {TypeError} if `path` is not a string.
|
|
110
118
|
*/
|
|
111
|
-
dirname(
|
|
119
|
+
dirname(path: string): string;
|
|
112
120
|
/**
|
|
113
121
|
* Return the last portion of a path. Similar to the Unix basename command.
|
|
114
122
|
* Often used to extract the file name from a fully qualified path.
|
|
115
123
|
*
|
|
116
|
-
* @param
|
|
124
|
+
* @param path the path to evaluate.
|
|
117
125
|
* @param ext optionally, an extension to remove from the result.
|
|
126
|
+
* @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string.
|
|
118
127
|
*/
|
|
119
|
-
basename(
|
|
128
|
+
basename(path: string, ext?: string): string;
|
|
120
129
|
/**
|
|
121
130
|
* Return the extension of the path, from the last '.' to end of string in the last portion of the path.
|
|
122
|
-
* If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string
|
|
131
|
+
* If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.
|
|
123
132
|
*
|
|
124
|
-
* @param
|
|
133
|
+
* @param path the path to evaluate.
|
|
134
|
+
* @throws {TypeError} if `path` is not a string.
|
|
125
135
|
*/
|
|
126
|
-
extname(
|
|
136
|
+
extname(path: string): string;
|
|
127
137
|
/**
|
|
128
138
|
* The platform-specific file separator. '\\' or '/'.
|
|
129
139
|
*/
|
|
@@ -135,15 +145,16 @@ declare module 'path' {
|
|
|
135
145
|
/**
|
|
136
146
|
* Returns an object from a path string - the opposite of format().
|
|
137
147
|
*
|
|
138
|
-
* @param
|
|
148
|
+
* @param path path to evaluate.
|
|
149
|
+
* @throws {TypeError} if `path` is not a string.
|
|
139
150
|
*/
|
|
140
|
-
parse(
|
|
151
|
+
parse(path: string): ParsedPath;
|
|
141
152
|
/**
|
|
142
153
|
* Returns a path string from an object - the opposite of parse().
|
|
143
154
|
*
|
|
144
|
-
* @param
|
|
155
|
+
* @param pathObject path to evaluate.
|
|
145
156
|
*/
|
|
146
|
-
format(
|
|
157
|
+
format(pathObject: FormatInputPathObject): string;
|
|
147
158
|
/**
|
|
148
159
|
* On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
|
|
149
160
|
* If path is not a string, path will be returned without modifications.
|
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',
|