@@ -4191,17 +4191,31 @@ declare interface FileSystem {
4191
4191
arg2 : FileSystemCallback < string | Buffer >
4192
4192
) : void ;
4193
4193
} ;
4194
- readdir : {
4195
- (
4196
- arg0 : string ,
4197
- arg1 : FileSystemCallback < ( string | Buffer ) [ ] | FileSystemDirent [ ] >
4198
- ) : void ;
4199
- (
4200
- arg0 : string ,
4201
- arg1 : object ,
4202
- arg2 : FileSystemCallback < ( string | Buffer ) [ ] | FileSystemDirent [ ] >
4203
- ) : void ;
4204
- } ;
4194
+ readdir : (
4195
+ arg0 : string ,
4196
+ arg1 ?:
4197
+ | null
4198
+ | "ascii"
4199
+ | "utf8"
4200
+ | "utf16le"
4201
+ | "ucs2"
4202
+ | "latin1"
4203
+ | "binary"
4204
+ | ( (
4205
+ arg0 ?: null | NodeJS . ErrnoException ,
4206
+ arg1 ?: any [ ] | ( string | Buffer ) [ ]
4207
+ ) => void )
4208
+ | ReaddirOptions
4209
+ | "utf-8"
4210
+ | "ucs-2"
4211
+ | "base64"
4212
+ | "hex"
4213
+ | "buffer" ,
4214
+ arg2 ?: (
4215
+ arg0 ?: null | NodeJS . ErrnoException ,
4216
+ arg1 ?: any [ ] | ( string | Buffer ) [ ]
4217
+ ) => void
4218
+ ) => void ;
4205
4219
readJson ?: {
4206
4220
( arg0 : string , arg1 : FileSystemCallback < object > ) : void ;
4207
4221
( arg0 : string , arg1 : object , arg2 : FileSystemCallback < object > ) : void ;
@@ -4234,11 +4248,6 @@ declare interface FileSystem {
4234
4248
declare interface FileSystemCallback < T > {
4235
4249
( err ?: null | ( PossibleFileSystemError & Error ) , result ?: T ) : any ;
4236
4250
}
4237
- declare interface FileSystemDirent {
4238
- name : string | Buffer ;
4239
- isDirectory : ( ) => boolean ;
4240
- isFile : ( ) => boolean ;
4241
- }
4242
4251
declare abstract class FileSystemInfo {
4243
4252
fs : InputFileSystem ;
4244
4253
logger ?: WebpackLogger ;
@@ -4590,7 +4599,7 @@ declare interface HashedModuleIdsPluginOptions {
4590
4599
/**
4591
4600
* The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.
4592
4601
*/
4593
- hashDigest ?: "latin1" | "hex " | "base64 " ;
4602
+ hashDigest ?: "latin1" | "base64 " | "hex " ;
4594
4603
4595
4604
/**
4596
4605
* The prefix length of the hash digest to use, defaults to 4.
@@ -9411,6 +9420,22 @@ declare class ReadFileCompileWasmPlugin {
9411
9420
*/
9412
9421
apply ( compiler : Compiler ) : void ;
9413
9422
}
9423
+ declare interface ReaddirOptions {
9424
+ encoding ?:
9425
+ | null
9426
+ | "ascii"
9427
+ | "utf8"
9428
+ | "utf16le"
9429
+ | "ucs2"
9430
+ | "latin1"
9431
+ | "binary"
9432
+ | "utf-8"
9433
+ | "ucs-2"
9434
+ | "base64"
9435
+ | "hex"
9436
+ | "buffer" ;
9437
+ withFileTypes ?: boolean ;
9438
+ }
9414
9439
declare class RealContentHashPlugin {
9415
9440
constructor ( __0 : { hashFunction : any ; hashDigest : any } ) ;
9416
9441
0 commit comments