4
4
* Run `yarn special-lint-fix` to update
5
5
*/
6
6
7
+ import { Dirent } from "fs" ;
7
8
import { AsyncSeriesBailHook , AsyncSeriesHook , SyncHook } from "tapable" ;
8
9
9
10
declare interface AliasOption {
@@ -51,7 +52,7 @@ declare class CachedInputFileSystem {
51
52
| null
52
53
| ( (
53
54
arg0 ?: null | NodeJS . ErrnoException ,
54
- arg1 ?: ( string | Buffer ) [ ] | unresolved [ ]
55
+ arg1 ?: ( string | Buffer ) [ ] | Dirent [ ]
55
56
) => void )
56
57
| ReaddirOptions
57
58
| "ascii"
@@ -67,7 +68,7 @@ declare class CachedInputFileSystem {
67
68
| "buffer" ,
68
69
arg2 ?: (
69
70
arg0 ?: null | NodeJS . ErrnoException ,
70
- arg1 ?: ( string | Buffer ) [ ] | unresolved [ ]
71
+ arg1 ?: ( string | Buffer ) [ ] | Dirent [ ]
71
72
) => void
72
73
) => void ;
73
74
readdirSync : (
@@ -100,9 +101,32 @@ declare class CachedInputFileSystem {
100
101
purge ( what ?: any ) : void ;
101
102
}
102
103
declare class CloneBasenamePlugin {
103
- constructor ( source ?: any , target ?: any ) ;
104
- source : any ;
105
- target : any ;
104
+ constructor (
105
+ source :
106
+ | string
107
+ | AsyncSeriesBailHook <
108
+ [ ResolveRequest , ResolveContext ] ,
109
+ null | ResolveRequest
110
+ > ,
111
+ target :
112
+ | string
113
+ | AsyncSeriesBailHook <
114
+ [ ResolveRequest , ResolveContext ] ,
115
+ null | ResolveRequest
116
+ >
117
+ ) ;
118
+ source :
119
+ | string
120
+ | AsyncSeriesBailHook <
121
+ [ ResolveRequest , ResolveContext ] ,
122
+ null | ResolveRequest
123
+ > ;
124
+ target :
125
+ | string
126
+ | AsyncSeriesBailHook <
127
+ [ ResolveRequest , ResolveContext ] ,
128
+ null | ResolveRequest
129
+ > ;
106
130
apply ( resolver : Resolver ) : void ;
107
131
}
108
132
type ErrorWithDetail = Error & { details ?: string } ;
@@ -128,7 +152,7 @@ declare interface FileSystem {
128
152
| null
129
153
| ( (
130
154
arg0 ?: null | NodeJS . ErrnoException ,
131
- arg1 ?: ( string | Buffer ) [ ] | unresolved [ ]
155
+ arg1 ?: ( string | Buffer ) [ ] | Dirent [ ]
132
156
) => void )
133
157
| ReaddirOptions
134
158
| "ascii"
@@ -144,7 +168,7 @@ declare interface FileSystem {
144
168
| "buffer" ,
145
169
arg2 ?: (
146
170
arg0 ?: null | NodeJS . ErrnoException ,
147
- arg1 ?: ( string | Buffer ) [ ] | unresolved [ ]
171
+ arg1 ?: ( string | Buffer ) [ ] | Dirent [ ]
148
172
) => void
149
173
) => void ;
150
174
readJson ?: {
@@ -626,11 +650,14 @@ declare namespace exports {
626
650
export namespace ResolverFactory {
627
651
export let createResolver : ( options : UserResolveOptions ) => Resolver ;
628
652
}
629
- export const forEachBail : (
630
- array ?: any ,
631
- iterator ?: any ,
632
- callback ?: any
633
- ) => any ;
653
+ export const forEachBail : < T > (
654
+ array : T [ ] ,
655
+ iterator : (
656
+ item : T ,
657
+ callback : ( err ?: null | Error , result ?: any ) => void
658
+ ) => void ,
659
+ callback : ( err ?: null | Error , result ?: ResolveRequest ) => void
660
+ ) => void ;
634
661
export type ResolveCallback = (
635
662
err : null | ErrorWithDetail ,
636
663
res ?: string | false ,
0 commit comments