@@ -4191,17 +4191,31 @@ declare interface FileSystem {
41914191 arg2 : FileSystemCallback < string | Buffer >
41924192 ) : void ;
41934193 } ;
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 ;
42054219 readJson ?: {
42064220 ( arg0 : string , arg1 : FileSystemCallback < object > ) : void ;
42074221 ( arg0 : string , arg1 : object , arg2 : FileSystemCallback < object > ) : void ;
@@ -4234,11 +4248,6 @@ declare interface FileSystem {
42344248declare interface FileSystemCallback < T > {
42354249 ( err ?: null | ( PossibleFileSystemError & Error ) , result ?: T ) : any ;
42364250}
4237- declare interface FileSystemDirent {
4238- name : string | Buffer ;
4239- isDirectory : ( ) => boolean ;
4240- isFile : ( ) => boolean ;
4241- }
42424251declare abstract class FileSystemInfo {
42434252 fs : InputFileSystem ;
42444253 logger ?: WebpackLogger ;
@@ -4590,7 +4599,7 @@ declare interface HashedModuleIdsPluginOptions {
45904599 /**
45914600 * The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.
45924601 */
4593- hashDigest ?: "latin1" | "hex " | "base64 " ;
4602+ hashDigest ?: "latin1" | "base64 " | "hex " ;
45944603
45954604 /**
45964605 * The prefix length of the hash digest to use, defaults to 4.
@@ -9411,6 +9420,22 @@ declare class ReadFileCompileWasmPlugin {
94119420 */
94129421 apply ( compiler : Compiler ) : void ;
94139422}
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+ }
94149439declare class RealContentHashPlugin {
94159440 constructor ( __0 : { hashFunction : any ; hashDigest : any } ) ;
94169441
0 commit comments