@@ -45,35 +45,35 @@ export declare class Stats {
4545 get birthtime ( ) : Date
4646}
4747
48- export declare function access ( path : string , mode ?: number | undefined | null ) : Promise < void >
48+ export declare function access ( path : string , mode ?: number | undefined | null ) : Promise < unknown >
4949
5050export declare function accessSync ( path : string , mode ?: number | undefined | null ) : void
5151
5252export declare function appendFile (
5353 path : string ,
5454 data : string | Buffer ,
5555 options ?: WriteFileOptions | undefined | null ,
56- ) : Promise < void >
56+ ) : Promise < unknown >
5757
5858export declare function appendFileSync (
5959 path : string ,
6060 data : string | Buffer ,
6161 options ?: WriteFileOptions | undefined | null ,
6262) : void
6363
64- export declare function chmod ( path : string , mode : number ) : Promise < void >
64+ export declare function chmod ( path : string , mode : number ) : Promise < unknown >
6565
6666export declare function chmodSync ( path : string , mode : number ) : void
6767
68- export declare function chown ( path : string , uid : number , gid : number ) : Promise < void >
68+ export declare function chown ( path : string , uid : number , gid : number ) : Promise < unknown >
6969
7070export declare function chownSync ( path : string , uid : number , gid : number ) : void
7171
72- export declare function copyFile ( src : string , dest : string , mode ?: number | undefined | null ) : Promise < void >
72+ export declare function copyFile ( src : string , dest : string , mode ?: number | undefined | null ) : Promise < unknown >
7373
7474export declare function copyFileSync ( src : string , dest : string , mode ?: number | undefined | null ) : void
7575
76- export declare function cp ( src : string , dest : string , options ?: CpOptions | undefined | null ) : Promise < void >
76+ export declare function cp ( src : string , dest : string , options ?: CpOptions | undefined | null ) : Promise < unknown >
7777
7878export interface CpOptions {
7979 recursive ?: boolean
@@ -91,21 +91,17 @@ export interface CpOptions {
9191
9292export declare function cpSync ( src : string , dest : string , options ?: CpOptions | undefined | null ) : void
9393
94- export declare function exists ( path : string ) : Promise < boolean >
94+ export declare function exists ( path : string ) : Promise < unknown >
9595
9696export declare function existsSync ( path : string ) : boolean
9797
98- export declare function glob (
99- pattern : string ,
100- options ?: GlobOptions | undefined | null ,
101- ) : Promise < Array < string > | Array < Dirent > >
98+ export declare function glob ( pattern : string , options ?: GlobOptions | undefined | null ) : Promise < unknown >
10299
103100export interface GlobOptions {
104101 cwd ?: string
105102 withFileTypes ?: boolean
106103 exclude ?: Array < string >
107104 concurrency ?: number
108- /** Respect .gitignore / .ignore files (default: true) */
109105 gitIgnore ?: boolean
110106}
111107
@@ -114,15 +110,15 @@ export declare function globSync(
114110 options ?: GlobOptions | undefined | null ,
115111) : Array < string > | Array < Dirent >
116112
117- export declare function link ( existingPath : string , newPath : string ) : Promise < void >
113+ export declare function link ( existingPath : string , newPath : string ) : Promise < unknown >
118114
119115export declare function linkSync ( existingPath : string , newPath : string ) : void
120116
121- export declare function lstat ( path : string ) : Promise < Stats >
117+ export declare function lstat ( path : string ) : Promise < unknown >
122118
123119export declare function lstatSync ( path : string ) : Stats
124120
125- export declare function mkdir ( path : string , options ?: MkdirOptions | undefined | null ) : Promise < string | null >
121+ export declare function mkdir ( path : string , options ?: MkdirOptions | undefined | null ) : Promise < unknown >
126122
127123export interface MkdirOptions {
128124 recursive ?: boolean
@@ -131,19 +127,29 @@ export interface MkdirOptions {
131127
132128export declare function mkdirSync ( path : string , options ?: MkdirOptions | undefined | null ) : string | null
133129
134- export declare function mkdtemp ( prefix : string ) : Promise < string >
130+ export declare function mkdtemp ( prefix : string ) : Promise < unknown >
135131
136132export declare function mkdtempSync ( prefix : string ) : string
137133
138- export declare function readdir (
139- path : string ,
140- options ?: ReaddirOptions | undefined | null ,
141- ) : Promise < Array < string > | Array < Dirent > >
142-
134+ export declare function readdir ( path : string , options ?: ReaddirOptions | undefined | null ) : Promise < unknown >
135+
136+ /** * Reads the contents of a directory.
137+ * @param {string | Buffer | URL } path
138+ * @param {string | {
139+ * encoding?: string;
140+ * withFileTypes?: boolean;
141+ * recursive?: boolean;
142+ * }} [options]
143+ * @param {(
144+ * err?: Error,
145+ * files?: string[] | Buffer[] | Dirent[]
146+ * ) => any} callback
147+ * @returns {void }
148+ */
143149export interface ReaddirOptions {
144150 /**
145151 * File name encoding. 'utf8' (default) returns strings.
146- * 'buffer' returns Buffer objects for each name (not yet supported, treated as 'utf8') .
152+ * 'buffer' returns Buffer objects for each name.
147153 * Other values are treated as 'utf8'.
148154 */
149155 encoding ?: string
@@ -158,7 +164,7 @@ export declare function readdirSync(
158164 options ?: ReaddirOptions | undefined | null ,
159165) : Array < string > | Array < Dirent >
160166
161- export declare function readFile ( path : string , options ?: ReadFileOptions | undefined | null ) : Promise < string | Buffer >
167+ export declare function readFile ( path : string , options ?: ReadFileOptions | undefined | null ) : Promise < unknown >
162168
163169export interface ReadFileOptions {
164170 encoding ?: string
@@ -167,21 +173,21 @@ export interface ReadFileOptions {
167173
168174export declare function readFileSync ( path : string , options ?: ReadFileOptions | undefined | null ) : string | Buffer
169175
170- export declare function readlink ( path : string ) : Promise < string >
176+ export declare function readlink ( path : string ) : Promise < unknown >
171177
172178export declare function readlinkSync ( path : string ) : string
173179
174- export declare function realpath ( path : string ) : Promise < string >
180+ export declare function realpath ( path : string ) : Promise < unknown >
175181
176182export declare function realpathSync ( path : string ) : string
177183
178- export declare function rename ( oldPath : string , newPath : string ) : Promise < void >
184+ export declare function rename ( oldPath : string , newPath : string ) : Promise < unknown >
179185
180186export declare function renameSync ( oldPath : string , newPath : string ) : void
181187
182- export declare function rm ( path : string , options ?: RmOptions | undefined | null ) : Promise < void >
188+ export declare function rm ( path : string , options ?: RmOptions | undefined | null ) : Promise < unknown >
183189
184- export declare function rmdir ( path : string ) : Promise < void >
190+ export declare function rmdir ( path : string ) : Promise < unknown >
185191
186192export declare function rmdirSync ( path : string ) : void
187193
@@ -191,7 +197,8 @@ export declare function rmdirSync(path: string): void
191197 * - `force`: When true, silently ignore errors when path does not exist.
192198 * - `recursive`: When true, remove directory and all its contents.
193199 * - `maxRetries`: If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or `EPERM` error is
194- * encountered, retries with a linear backoff of `retryDelay` ms on each try.
200+ * encountered, Node.js retries the operation with a linear backoff of `retryDelay` ms longer on
201+ * each try. This option represents the number of retries.
195202 * - `retryDelay`: The amount of time in milliseconds to wait between retries (default 100ms).
196203 * - `concurrency` (hyper-fs extension): Number of parallel threads for recursive removal.
197204 */
@@ -205,41 +212,31 @@ export interface RmOptions {
205212
206213export declare function rmSync ( path : string , options ?: RmOptions | undefined | null ) : void
207214
208- export declare function stat ( path : string ) : Promise < Stats >
215+ export declare function stat ( path : string ) : Promise < unknown >
209216
210217export declare function statSync ( path : string ) : Stats
211218
212- export declare function symlink (
213- target : string ,
214- path : string ,
215- /** On Windows: 'file' | 'dir' | 'junction'. Ignored on Unix. */
216- symlinkType ?: string | undefined | null ,
217- ) : Promise < void >
219+ export declare function symlink ( target : string , path : string , symlinkType ?: string | undefined | null ) : Promise < unknown >
218220
219- export declare function symlinkSync (
220- target : string ,
221- path : string ,
222- /** On Windows: 'file' | 'dir' | 'junction'. Ignored on Unix. */
223- symlinkType ?: string | undefined | null ,
224- ) : void
221+ export declare function symlinkSync ( target : string , path : string , symlinkType ?: string | undefined | null ) : void
225222
226- export declare function truncate ( path : string , len ?: number | undefined | null ) : Promise < void >
223+ export declare function truncate ( path : string , len ?: number | undefined | null ) : Promise < unknown >
227224
228225export declare function truncateSync ( path : string , len ?: number | undefined | null ) : void
229226
230- export declare function unlink ( path : string ) : Promise < void >
227+ export declare function unlink ( path : string ) : Promise < unknown >
231228
232229export declare function unlinkSync ( path : string ) : void
233230
234- export declare function utimes ( path : string , atime : number , mtime : number ) : Promise < void >
231+ export declare function utimes ( path : string , atime : number , mtime : number ) : Promise < unknown >
235232
236233export declare function utimesSync ( path : string , atime : number , mtime : number ) : void
237234
238235export declare function writeFile (
239236 path : string ,
240237 data : string | Buffer ,
241238 options ?: WriteFileOptions | undefined | null ,
242- ) : Promise < void >
239+ ) : Promise < unknown >
243240
244241export interface WriteFileOptions {
245242 encoding ?: string
0 commit comments