@rspack/core 1.4.0-beta.0 → 1.4.0-rc.0
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.
- package/README.md +1 -1
- package/dist/Module.d.ts +0 -1
- package/dist/MultiCompiler.d.ts +4 -1
- package/dist/MultiWatching.d.ts +1 -0
- package/dist/builtin-loader/swc/pluginImport.d.ts +4 -26
- package/dist/builtin-loader/swc/types.d.ts +149 -1992
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +2 -1
- package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +3 -3
- package/dist/config/devServer.d.ts +1 -1
- package/dist/config/normalization.d.ts +3 -1
- package/dist/config/types.d.ts +21 -3
- package/dist/config/utils.d.ts +3 -17
- package/dist/config/zod.d.ts +687 -4492
- package/dist/exports.d.ts +5 -2
- package/dist/index.js +3926 -1289
- package/dist/swc.d.ts +2 -0
- package/dist/util/validate.d.ts +1 -1
- package/package.json +5 -5
- package/compiled/enhanced-resolve/CachedInputFileSystem.d.ts +0 -0
- package/compiled/enhanced-resolve/CachedInputFileSystem.js +0 -664
- package/compiled/enhanced-resolve/index.d.ts +0 -1124
- package/compiled/enhanced-resolve/license +0 -20
- package/compiled/enhanced-resolve/package.json +0 -1
- package/compiled/zod/dist/types/index.d.ts +0 -3
- package/compiled/zod/dist/types/v3/ZodError.d.ts +0 -164
- package/compiled/zod/dist/types/v3/benchmarks/datetime.d.ts +0 -5
- package/compiled/zod/dist/types/v3/benchmarks/discriminatedUnion.d.ts +0 -5
- package/compiled/zod/dist/types/v3/benchmarks/index.d.ts +0 -1
- package/compiled/zod/dist/types/v3/benchmarks/ipv4.d.ts +0 -5
- package/compiled/zod/dist/types/v3/benchmarks/object.d.ts +0 -5
- package/compiled/zod/dist/types/v3/benchmarks/primitives.d.ts +0 -5
- package/compiled/zod/dist/types/v3/benchmarks/realworld.d.ts +0 -5
- package/compiled/zod/dist/types/v3/benchmarks/string.d.ts +0 -5
- package/compiled/zod/dist/types/v3/benchmarks/union.d.ts +0 -5
- package/compiled/zod/dist/types/v3/errors.d.ts +0 -5
- package/compiled/zod/dist/types/v3/external.d.ts +0 -6
- package/compiled/zod/dist/types/v3/helpers/enumUtil.d.ts +0 -8
- package/compiled/zod/dist/types/v3/helpers/errorUtil.d.ts +0 -9
- package/compiled/zod/dist/types/v3/helpers/parseUtil.d.ts +0 -78
- package/compiled/zod/dist/types/v3/helpers/partialUtil.d.ts +0 -8
- package/compiled/zod/dist/types/v3/helpers/typeAliases.d.ts +0 -2
- package/compiled/zod/dist/types/v3/helpers/util.d.ts +0 -85
- package/compiled/zod/dist/types/v3/index.d.ts +0 -4
- package/compiled/zod/dist/types/v3/locales/en.d.ts +0 -3
- package/compiled/zod/dist/types/v3/standard-schema.d.ts +0 -102
- package/compiled/zod/dist/types/v3/tests/Mocker.d.ts +0 -17
- package/compiled/zod/dist/types/v3/types.d.ts +0 -1031
- package/compiled/zod/dist/types/v4/classic/checks.d.ts +0 -1
- package/compiled/zod/dist/types/v4/classic/coerce.d.ts +0 -17
- package/compiled/zod/dist/types/v4/classic/compat.d.ts +0 -48
- package/compiled/zod/dist/types/v4/classic/errors.d.ts +0 -30
- package/compiled/zod/dist/types/v4/classic/external.d.ts +0 -13
- package/compiled/zod/dist/types/v4/classic/index.d.ts +0 -4
- package/compiled/zod/dist/types/v4/classic/iso.d.ts +0 -22
- package/compiled/zod/dist/types/v4/classic/parse.d.ts +0 -23
- package/compiled/zod/dist/types/v4/classic/schemas.d.ts +0 -624
- package/compiled/zod/dist/types/v4/core/api.d.ts +0 -274
- package/compiled/zod/dist/types/v4/core/checks.d.ts +0 -277
- package/compiled/zod/dist/types/v4/core/config.d.ts +0 -9
- package/compiled/zod/dist/types/v4/core/core.d.ts +0 -47
- package/compiled/zod/dist/types/v4/core/doc.d.ts +0 -14
- package/compiled/zod/dist/types/v4/core/errors.d.ts +0 -204
- package/compiled/zod/dist/types/v4/core/function.d.ts +0 -52
- package/compiled/zod/dist/types/v4/core/index.d.ts +0 -15
- package/compiled/zod/dist/types/v4/core/json-schema.d.ts +0 -100
- package/compiled/zod/dist/types/v4/core/parse.d.ts +0 -25
- package/compiled/zod/dist/types/v4/core/regexes.d.ts +0 -62
- package/compiled/zod/dist/types/v4/core/registries.d.ts +0 -39
- package/compiled/zod/dist/types/v4/core/schemas.d.ts +0 -1005
- package/compiled/zod/dist/types/v4/core/standard-schema.d.ts +0 -55
- package/compiled/zod/dist/types/v4/core/to-json-schema.d.ts +0 -84
- package/compiled/zod/dist/types/v4/core/util.d.ts +0 -182
- package/compiled/zod/dist/types/v4/core/versions.d.ts +0 -5
- package/compiled/zod/dist/types/v4/core/zsf.d.ts +0 -91
- package/compiled/zod/dist/types/v4/index.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/ar.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/az.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/be.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/ca.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/cs.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/de.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/en.d.ts +0 -5
- package/compiled/zod/dist/types/v4/locales/es.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/fa.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/fi.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/fr-CA.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/fr.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/he.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/hu.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/id.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/index.d.ts +0 -38
- package/compiled/zod/dist/types/v4/locales/it.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/ja.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/kh.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/ko.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/mk.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/ms.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/nl.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/no.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/ota.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/pl.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/ps.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/pt.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/ru.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/sl.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/sv.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/ta.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/th.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/tr.d.ts +0 -5
- package/compiled/zod/dist/types/v4/locales/ua.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/ur.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/vi.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/zh-CN.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/zh-TW.d.ts +0 -4
- package/compiled/zod/dist/types/v4/mini/checks.d.ts +0 -1
- package/compiled/zod/dist/types/v4/mini/coerce.d.ts +0 -7
- package/compiled/zod/dist/types/v4/mini/external.d.ts +0 -11
- package/compiled/zod/dist/types/v4/mini/index.d.ts +0 -3
- package/compiled/zod/dist/types/v4/mini/iso.d.ts +0 -22
- package/compiled/zod/dist/types/v4/mini/parse.d.ts +0 -1
- package/compiled/zod/dist/types/v4/mini/schemas.d.ts +0 -350
- package/compiled/zod/index.js +0 -4513
- package/compiled/zod/license +0 -21
- package/compiled/zod/package.json +0 -1
- package/compiled/zod/v3/index.d.ts +0 -3
- package/compiled/zod/v4/core/index.d.ts +0 -1
- package/compiled/zod/v4/index.d.ts +0 -3
- package/compiled/zod/v4/locales/en.d.ts +0 -2
- package/compiled/zod/v4/locales/index.d.ts +0 -1
- package/compiled/zod/v4-mini/index.d.ts +0 -1
@@ -1,1124 +0,0 @@
|
|
1
|
-
import { Buffer } from 'buffer';
|
2
|
-
import { SyncHook, AsyncSeriesBailHook, AsyncSeriesHook } from 'tapable';
|
3
|
-
import { URL } from 'url';
|
4
|
-
|
5
|
-
/*
|
6
|
-
* This file was automatically generated.
|
7
|
-
* DO NOT MODIFY BY HAND.
|
8
|
-
* Run `yarn special-lint-fix` to update
|
9
|
-
*/
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
declare interface Abortable {
|
14
|
-
/**
|
15
|
-
* When provided the corresponding `AbortController` can be used to cancel an asynchronous action.
|
16
|
-
*/
|
17
|
-
signal?: AbortSignal;
|
18
|
-
}
|
19
|
-
type Alias = string | false | string[];
|
20
|
-
declare interface AliasOption {
|
21
|
-
alias: Alias;
|
22
|
-
name: string;
|
23
|
-
onlyModule?: boolean;
|
24
|
-
}
|
25
|
-
type AliasOptionNewRequest = string | false | string[];
|
26
|
-
declare interface AliasOptions {
|
27
|
-
[index: string]: AliasOptionNewRequest;
|
28
|
-
}
|
29
|
-
type BaseFileSystem = FileSystem & SyncFileSystem;
|
30
|
-
declare interface BaseResolveRequest {
|
31
|
-
path: string | false;
|
32
|
-
context?: object;
|
33
|
-
descriptionFilePath?: string;
|
34
|
-
descriptionFileRoot?: string;
|
35
|
-
descriptionFileData?: JsonObject;
|
36
|
-
relativePath?: string;
|
37
|
-
ignoreSymlinks?: boolean;
|
38
|
-
fullySpecified?: boolean;
|
39
|
-
__innerRequest?: string;
|
40
|
-
__innerRequest_request?: string;
|
41
|
-
__innerRequest_relativePath?: string;
|
42
|
-
}
|
43
|
-
type BufferEncoding =
|
44
|
-
| "ascii"
|
45
|
-
| "utf8"
|
46
|
-
| "utf-8"
|
47
|
-
| "utf16le"
|
48
|
-
| "utf-16le"
|
49
|
-
| "ucs2"
|
50
|
-
| "ucs-2"
|
51
|
-
| "base64"
|
52
|
-
| "base64url"
|
53
|
-
| "latin1"
|
54
|
-
| "binary"
|
55
|
-
| "hex";
|
56
|
-
type BufferEncodingOption = "buffer" | { encoding: "buffer" };
|
57
|
-
declare class CachedInputFileSystem {
|
58
|
-
constructor(fileSystem: BaseFileSystem, duration: number);
|
59
|
-
fileSystem: BaseFileSystem;
|
60
|
-
lstat?: LStat;
|
61
|
-
lstatSync?: LStatSync;
|
62
|
-
stat: Stat;
|
63
|
-
statSync: StatSync;
|
64
|
-
readdir: Readdir;
|
65
|
-
readdirSync: ReaddirSync;
|
66
|
-
readFile: ReadFile;
|
67
|
-
readFileSync: ReadFileSync;
|
68
|
-
readJson?: (
|
69
|
-
arg0: PathOrFileDescriptor,
|
70
|
-
arg1: (
|
71
|
-
arg0: null | Error | NodeJS.ErrnoException,
|
72
|
-
arg1?: JsonObject
|
73
|
-
) => void
|
74
|
-
) => void;
|
75
|
-
readJsonSync?: (arg0: PathOrFileDescriptor) => JsonObject;
|
76
|
-
readlink: Readlink;
|
77
|
-
readlinkSync: ReadlinkSync;
|
78
|
-
realpath?: RealPath;
|
79
|
-
realpathSync?: RealPathSync;
|
80
|
-
purge(
|
81
|
-
what?:
|
82
|
-
| string
|
83
|
-
| number
|
84
|
-
| Buffer
|
85
|
-
| URL_url
|
86
|
-
| (string | number | Buffer | URL_url)[]
|
87
|
-
| Set<string | number | Buffer | URL_url>
|
88
|
-
): void;
|
89
|
-
}
|
90
|
-
declare class CloneBasenamePlugin {
|
91
|
-
constructor(
|
92
|
-
source:
|
93
|
-
| string
|
94
|
-
| AsyncSeriesBailHook<
|
95
|
-
[ResolveRequest, ResolveContext],
|
96
|
-
null | ResolveRequest
|
97
|
-
>,
|
98
|
-
target:
|
99
|
-
| string
|
100
|
-
| AsyncSeriesBailHook<
|
101
|
-
[ResolveRequest, ResolveContext],
|
102
|
-
null | ResolveRequest
|
103
|
-
>
|
104
|
-
);
|
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
|
-
apply(resolver: Resolver): void;
|
118
|
-
}
|
119
|
-
declare interface Dirent {
|
120
|
-
isFile: () => boolean;
|
121
|
-
isDirectory: () => boolean;
|
122
|
-
isBlockDevice: () => boolean;
|
123
|
-
isCharacterDevice: () => boolean;
|
124
|
-
isSymbolicLink: () => boolean;
|
125
|
-
isFIFO: () => boolean;
|
126
|
-
isSocket: () => boolean;
|
127
|
-
name: string;
|
128
|
-
path: string;
|
129
|
-
}
|
130
|
-
type EncodingOption =
|
131
|
-
| undefined
|
132
|
-
| null
|
133
|
-
| "ascii"
|
134
|
-
| "utf8"
|
135
|
-
| "utf-8"
|
136
|
-
| "utf16le"
|
137
|
-
| "utf-16le"
|
138
|
-
| "ucs2"
|
139
|
-
| "ucs-2"
|
140
|
-
| "base64"
|
141
|
-
| "base64url"
|
142
|
-
| "latin1"
|
143
|
-
| "binary"
|
144
|
-
| "hex"
|
145
|
-
| ObjectEncodingOptions;
|
146
|
-
type ErrorWithDetail = Error & { details?: string };
|
147
|
-
declare interface ExtensionAliasOption {
|
148
|
-
alias: string | string[];
|
149
|
-
extension: string;
|
150
|
-
}
|
151
|
-
declare interface ExtensionAliasOptions {
|
152
|
-
[index: string]: string | string[];
|
153
|
-
}
|
154
|
-
declare interface FileSystem {
|
155
|
-
readFile: ReadFile;
|
156
|
-
readdir: Readdir;
|
157
|
-
readJson?: (
|
158
|
-
arg0: PathOrFileDescriptor,
|
159
|
-
arg1: (
|
160
|
-
arg0: null | Error | NodeJS.ErrnoException,
|
161
|
-
arg1?: JsonObject
|
162
|
-
) => void
|
163
|
-
) => void;
|
164
|
-
readlink: Readlink;
|
165
|
-
lstat?: LStat;
|
166
|
-
stat: Stat;
|
167
|
-
realpath?: RealPath;
|
168
|
-
}
|
169
|
-
type IBigIntStats = IStatsBase<bigint> & {
|
170
|
-
atimeNs: bigint;
|
171
|
-
mtimeNs: bigint;
|
172
|
-
ctimeNs: bigint;
|
173
|
-
birthtimeNs: bigint;
|
174
|
-
};
|
175
|
-
declare interface IStats {
|
176
|
-
isFile: () => boolean;
|
177
|
-
isDirectory: () => boolean;
|
178
|
-
isBlockDevice: () => boolean;
|
179
|
-
isCharacterDevice: () => boolean;
|
180
|
-
isSymbolicLink: () => boolean;
|
181
|
-
isFIFO: () => boolean;
|
182
|
-
isSocket: () => boolean;
|
183
|
-
dev: number;
|
184
|
-
ino: number;
|
185
|
-
mode: number;
|
186
|
-
nlink: number;
|
187
|
-
uid: number;
|
188
|
-
gid: number;
|
189
|
-
rdev: number;
|
190
|
-
size: number;
|
191
|
-
blksize: number;
|
192
|
-
blocks: number;
|
193
|
-
atimeMs: number;
|
194
|
-
mtimeMs: number;
|
195
|
-
ctimeMs: number;
|
196
|
-
birthtimeMs: number;
|
197
|
-
atime: Date;
|
198
|
-
mtime: Date;
|
199
|
-
ctime: Date;
|
200
|
-
birthtime: Date;
|
201
|
-
}
|
202
|
-
declare interface IStatsBase<T> {
|
203
|
-
isFile: () => boolean;
|
204
|
-
isDirectory: () => boolean;
|
205
|
-
isBlockDevice: () => boolean;
|
206
|
-
isCharacterDevice: () => boolean;
|
207
|
-
isSymbolicLink: () => boolean;
|
208
|
-
isFIFO: () => boolean;
|
209
|
-
isSocket: () => boolean;
|
210
|
-
dev: T;
|
211
|
-
ino: T;
|
212
|
-
mode: T;
|
213
|
-
nlink: T;
|
214
|
-
uid: T;
|
215
|
-
gid: T;
|
216
|
-
rdev: T;
|
217
|
-
size: T;
|
218
|
-
blksize: T;
|
219
|
-
blocks: T;
|
220
|
-
atimeMs: T;
|
221
|
-
mtimeMs: T;
|
222
|
-
ctimeMs: T;
|
223
|
-
birthtimeMs: T;
|
224
|
-
atime: Date;
|
225
|
-
mtime: Date;
|
226
|
-
ctime: Date;
|
227
|
-
birthtime: Date;
|
228
|
-
}
|
229
|
-
declare interface Iterator<T, Z> {
|
230
|
-
(
|
231
|
-
item: T,
|
232
|
-
callback: (err?: null | Error, result?: null | Z) => void,
|
233
|
-
i: number
|
234
|
-
): void;
|
235
|
-
}
|
236
|
-
type JsonObject = { [index: string]: JsonValue } & {
|
237
|
-
[index: string]:
|
238
|
-
| undefined
|
239
|
-
| null
|
240
|
-
| string
|
241
|
-
| number
|
242
|
-
| boolean
|
243
|
-
| JsonObject
|
244
|
-
| JsonValue[];
|
245
|
-
};
|
246
|
-
type JsonValue = null | string | number | boolean | JsonObject | JsonValue[];
|
247
|
-
declare interface KnownHooks {
|
248
|
-
resolveStep: SyncHook<
|
249
|
-
[
|
250
|
-
AsyncSeriesBailHook<
|
251
|
-
[ResolveRequest, ResolveContext],
|
252
|
-
null | ResolveRequest
|
253
|
-
>,
|
254
|
-
ResolveRequest
|
255
|
-
]
|
256
|
-
>;
|
257
|
-
noResolve: SyncHook<[ResolveRequest, Error]>;
|
258
|
-
resolve: AsyncSeriesBailHook<
|
259
|
-
[ResolveRequest, ResolveContext],
|
260
|
-
null | ResolveRequest
|
261
|
-
>;
|
262
|
-
result: AsyncSeriesHook<[ResolveRequest, ResolveContext]>;
|
263
|
-
}
|
264
|
-
declare interface LStat {
|
265
|
-
(
|
266
|
-
path: PathLike,
|
267
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
268
|
-
): void;
|
269
|
-
(
|
270
|
-
path: PathLike,
|
271
|
-
options: undefined | (StatOptions & { bigint?: false }),
|
272
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
273
|
-
): void;
|
274
|
-
(
|
275
|
-
path: PathLike,
|
276
|
-
options: StatOptions & { bigint: true },
|
277
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IBigIntStats) => void
|
278
|
-
): void;
|
279
|
-
(
|
280
|
-
path: PathLike,
|
281
|
-
options: undefined | StatOptions,
|
282
|
-
callback: (
|
283
|
-
arg0: null | NodeJS.ErrnoException,
|
284
|
-
arg1?: IStats | IBigIntStats
|
285
|
-
) => void
|
286
|
-
): void;
|
287
|
-
}
|
288
|
-
declare interface LStatSync {
|
289
|
-
(path: PathLike, options?: undefined): IStats;
|
290
|
-
(
|
291
|
-
path: PathLike,
|
292
|
-
options?: StatSyncOptions & { bigint?: false; throwIfNoEntry: false }
|
293
|
-
): undefined | IStats;
|
294
|
-
(
|
295
|
-
path: PathLike,
|
296
|
-
options: StatSyncOptions & { bigint: true; throwIfNoEntry: false }
|
297
|
-
): undefined | IBigIntStats;
|
298
|
-
(path: PathLike, options?: StatSyncOptions & { bigint?: false }): IStats;
|
299
|
-
(path: PathLike, options: StatSyncOptions & { bigint: true }): IBigIntStats;
|
300
|
-
(
|
301
|
-
path: PathLike,
|
302
|
-
options: StatSyncOptions & { bigint: boolean; throwIfNoEntry?: false }
|
303
|
-
): IStats | IBigIntStats;
|
304
|
-
(path: PathLike, options?: StatSyncOptions):
|
305
|
-
| undefined
|
306
|
-
| IStats
|
307
|
-
| IBigIntStats;
|
308
|
-
}
|
309
|
-
declare class LogInfoPlugin {
|
310
|
-
constructor(
|
311
|
-
source:
|
312
|
-
| string
|
313
|
-
| AsyncSeriesBailHook<
|
314
|
-
[ResolveRequest, ResolveContext],
|
315
|
-
null | ResolveRequest
|
316
|
-
>
|
317
|
-
);
|
318
|
-
source:
|
319
|
-
| string
|
320
|
-
| AsyncSeriesBailHook<
|
321
|
-
[ResolveRequest, ResolveContext],
|
322
|
-
null | ResolveRequest
|
323
|
-
>;
|
324
|
-
apply(resolver: Resolver): void;
|
325
|
-
}
|
326
|
-
declare interface ObjectEncodingOptions {
|
327
|
-
encoding?:
|
328
|
-
| null
|
329
|
-
| "ascii"
|
330
|
-
| "utf8"
|
331
|
-
| "utf-8"
|
332
|
-
| "utf16le"
|
333
|
-
| "utf-16le"
|
334
|
-
| "ucs2"
|
335
|
-
| "ucs-2"
|
336
|
-
| "base64"
|
337
|
-
| "base64url"
|
338
|
-
| "latin1"
|
339
|
-
| "binary"
|
340
|
-
| "hex";
|
341
|
-
}
|
342
|
-
declare interface ParsedIdentifier {
|
343
|
-
request: string;
|
344
|
-
query: string;
|
345
|
-
fragment: string;
|
346
|
-
directory: boolean;
|
347
|
-
module: boolean;
|
348
|
-
file: boolean;
|
349
|
-
internal: boolean;
|
350
|
-
}
|
351
|
-
type PathLike = string | Buffer | URL_url;
|
352
|
-
type PathOrFileDescriptor = string | number | Buffer | URL_url;
|
353
|
-
type Plugin =
|
354
|
-
| undefined
|
355
|
-
| null
|
356
|
-
| false
|
357
|
-
| ""
|
358
|
-
| 0
|
359
|
-
| { apply: (arg0: Resolver) => void }
|
360
|
-
| ((this: Resolver, arg1: Resolver) => void);
|
361
|
-
declare interface PnpApi {
|
362
|
-
resolveToUnqualified: (
|
363
|
-
arg0: string,
|
364
|
-
arg1: string,
|
365
|
-
arg2: object
|
366
|
-
) => null | string;
|
367
|
-
}
|
368
|
-
declare interface ReadFile {
|
369
|
-
(
|
370
|
-
path: PathOrFileDescriptor,
|
371
|
-
options:
|
372
|
-
| undefined
|
373
|
-
| null
|
374
|
-
| ({ encoding?: null; flag?: string } & Abortable),
|
375
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
|
376
|
-
): void;
|
377
|
-
(
|
378
|
-
path: PathOrFileDescriptor,
|
379
|
-
options:
|
380
|
-
| ({ encoding: BufferEncoding; flag?: string } & Abortable)
|
381
|
-
| "ascii"
|
382
|
-
| "utf8"
|
383
|
-
| "utf-8"
|
384
|
-
| "utf16le"
|
385
|
-
| "utf-16le"
|
386
|
-
| "ucs2"
|
387
|
-
| "ucs-2"
|
388
|
-
| "base64"
|
389
|
-
| "base64url"
|
390
|
-
| "latin1"
|
391
|
-
| "binary"
|
392
|
-
| "hex",
|
393
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
394
|
-
): void;
|
395
|
-
(
|
396
|
-
path: PathOrFileDescriptor,
|
397
|
-
options:
|
398
|
-
| undefined
|
399
|
-
| null
|
400
|
-
| "ascii"
|
401
|
-
| "utf8"
|
402
|
-
| "utf-8"
|
403
|
-
| "utf16le"
|
404
|
-
| "utf-16le"
|
405
|
-
| "ucs2"
|
406
|
-
| "ucs-2"
|
407
|
-
| "base64"
|
408
|
-
| "base64url"
|
409
|
-
| "latin1"
|
410
|
-
| "binary"
|
411
|
-
| "hex"
|
412
|
-
| (ObjectEncodingOptions & { flag?: string } & Abortable),
|
413
|
-
callback: (
|
414
|
-
arg0: null | NodeJS.ErrnoException,
|
415
|
-
arg1?: string | Buffer
|
416
|
-
) => void
|
417
|
-
): void;
|
418
|
-
(
|
419
|
-
path: PathOrFileDescriptor,
|
420
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
|
421
|
-
): void;
|
422
|
-
}
|
423
|
-
declare interface ReadFileSync {
|
424
|
-
(
|
425
|
-
path: PathOrFileDescriptor,
|
426
|
-
options?: null | { encoding?: null; flag?: string }
|
427
|
-
): Buffer;
|
428
|
-
(
|
429
|
-
path: PathOrFileDescriptor,
|
430
|
-
options:
|
431
|
-
| "ascii"
|
432
|
-
| "utf8"
|
433
|
-
| "utf-8"
|
434
|
-
| "utf16le"
|
435
|
-
| "utf-16le"
|
436
|
-
| "ucs2"
|
437
|
-
| "ucs-2"
|
438
|
-
| "base64"
|
439
|
-
| "base64url"
|
440
|
-
| "latin1"
|
441
|
-
| "binary"
|
442
|
-
| "hex"
|
443
|
-
| { encoding: BufferEncoding; flag?: string }
|
444
|
-
): string;
|
445
|
-
(
|
446
|
-
path: PathOrFileDescriptor,
|
447
|
-
options?:
|
448
|
-
| null
|
449
|
-
| "ascii"
|
450
|
-
| "utf8"
|
451
|
-
| "utf-8"
|
452
|
-
| "utf16le"
|
453
|
-
| "utf-16le"
|
454
|
-
| "ucs2"
|
455
|
-
| "ucs-2"
|
456
|
-
| "base64"
|
457
|
-
| "base64url"
|
458
|
-
| "latin1"
|
459
|
-
| "binary"
|
460
|
-
| "hex"
|
461
|
-
| (ObjectEncodingOptions & { flag?: string })
|
462
|
-
): string | Buffer;
|
463
|
-
}
|
464
|
-
declare interface Readdir {
|
465
|
-
(
|
466
|
-
path: PathLike,
|
467
|
-
options:
|
468
|
-
| undefined
|
469
|
-
| null
|
470
|
-
| "ascii"
|
471
|
-
| "utf8"
|
472
|
-
| "utf-8"
|
473
|
-
| "utf16le"
|
474
|
-
| "utf-16le"
|
475
|
-
| "ucs2"
|
476
|
-
| "ucs-2"
|
477
|
-
| "base64"
|
478
|
-
| "base64url"
|
479
|
-
| "latin1"
|
480
|
-
| "binary"
|
481
|
-
| "hex"
|
482
|
-
| {
|
483
|
-
encoding:
|
484
|
-
| null
|
485
|
-
| "ascii"
|
486
|
-
| "utf8"
|
487
|
-
| "utf-8"
|
488
|
-
| "utf16le"
|
489
|
-
| "utf-16le"
|
490
|
-
| "ucs2"
|
491
|
-
| "ucs-2"
|
492
|
-
| "base64"
|
493
|
-
| "base64url"
|
494
|
-
| "latin1"
|
495
|
-
| "binary"
|
496
|
-
| "hex";
|
497
|
-
withFileTypes?: false;
|
498
|
-
recursive?: boolean;
|
499
|
-
},
|
500
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string[]) => void
|
501
|
-
): void;
|
502
|
-
(
|
503
|
-
path: PathLike,
|
504
|
-
options:
|
505
|
-
| { encoding: "buffer"; withFileTypes?: false; recursive?: boolean }
|
506
|
-
| "buffer",
|
507
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer[]) => void
|
508
|
-
): void;
|
509
|
-
(
|
510
|
-
path: PathLike,
|
511
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string[]) => void
|
512
|
-
): void;
|
513
|
-
(
|
514
|
-
path: PathLike,
|
515
|
-
options:
|
516
|
-
| undefined
|
517
|
-
| null
|
518
|
-
| "ascii"
|
519
|
-
| "utf8"
|
520
|
-
| "utf-8"
|
521
|
-
| "utf16le"
|
522
|
-
| "utf-16le"
|
523
|
-
| "ucs2"
|
524
|
-
| "ucs-2"
|
525
|
-
| "base64"
|
526
|
-
| "base64url"
|
527
|
-
| "latin1"
|
528
|
-
| "binary"
|
529
|
-
| "hex"
|
530
|
-
| (ObjectEncodingOptions & {
|
531
|
-
withFileTypes?: false;
|
532
|
-
recursive?: boolean;
|
533
|
-
}),
|
534
|
-
callback: (
|
535
|
-
arg0: null | NodeJS.ErrnoException,
|
536
|
-
arg1?: string[] | Buffer[]
|
537
|
-
) => void
|
538
|
-
): void;
|
539
|
-
(
|
540
|
-
path: PathLike,
|
541
|
-
options: ObjectEncodingOptions & {
|
542
|
-
withFileTypes: true;
|
543
|
-
recursive?: boolean;
|
544
|
-
},
|
545
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Dirent[]) => void
|
546
|
-
): void;
|
547
|
-
}
|
548
|
-
declare interface ReaddirSync {
|
549
|
-
(
|
550
|
-
path: PathLike,
|
551
|
-
options?:
|
552
|
-
| null
|
553
|
-
| "ascii"
|
554
|
-
| "utf8"
|
555
|
-
| "utf-8"
|
556
|
-
| "utf16le"
|
557
|
-
| "utf-16le"
|
558
|
-
| "ucs2"
|
559
|
-
| "ucs-2"
|
560
|
-
| "base64"
|
561
|
-
| "base64url"
|
562
|
-
| "latin1"
|
563
|
-
| "binary"
|
564
|
-
| "hex"
|
565
|
-
| {
|
566
|
-
encoding:
|
567
|
-
| null
|
568
|
-
| "ascii"
|
569
|
-
| "utf8"
|
570
|
-
| "utf-8"
|
571
|
-
| "utf16le"
|
572
|
-
| "utf-16le"
|
573
|
-
| "ucs2"
|
574
|
-
| "ucs-2"
|
575
|
-
| "base64"
|
576
|
-
| "base64url"
|
577
|
-
| "latin1"
|
578
|
-
| "binary"
|
579
|
-
| "hex";
|
580
|
-
withFileTypes?: false;
|
581
|
-
recursive?: boolean;
|
582
|
-
}
|
583
|
-
): string[];
|
584
|
-
(
|
585
|
-
path: PathLike,
|
586
|
-
options:
|
587
|
-
| "buffer"
|
588
|
-
| { encoding: "buffer"; withFileTypes?: false; recursive?: boolean }
|
589
|
-
): Buffer[];
|
590
|
-
(
|
591
|
-
path: PathLike,
|
592
|
-
options?:
|
593
|
-
| null
|
594
|
-
| "ascii"
|
595
|
-
| "utf8"
|
596
|
-
| "utf-8"
|
597
|
-
| "utf16le"
|
598
|
-
| "utf-16le"
|
599
|
-
| "ucs2"
|
600
|
-
| "ucs-2"
|
601
|
-
| "base64"
|
602
|
-
| "base64url"
|
603
|
-
| "latin1"
|
604
|
-
| "binary"
|
605
|
-
| "hex"
|
606
|
-
| (ObjectEncodingOptions & { withFileTypes?: false; recursive?: boolean })
|
607
|
-
): string[] | Buffer[];
|
608
|
-
(
|
609
|
-
path: PathLike,
|
610
|
-
options: ObjectEncodingOptions & {
|
611
|
-
withFileTypes: true;
|
612
|
-
recursive?: boolean;
|
613
|
-
}
|
614
|
-
): Dirent[];
|
615
|
-
}
|
616
|
-
declare interface Readlink {
|
617
|
-
(
|
618
|
-
path: PathLike,
|
619
|
-
options: EncodingOption,
|
620
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
621
|
-
): void;
|
622
|
-
(
|
623
|
-
path: PathLike,
|
624
|
-
options: BufferEncodingOption,
|
625
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
|
626
|
-
): void;
|
627
|
-
(
|
628
|
-
path: PathLike,
|
629
|
-
options: EncodingOption,
|
630
|
-
callback: (
|
631
|
-
arg0: null | NodeJS.ErrnoException,
|
632
|
-
arg1?: string | Buffer
|
633
|
-
) => void
|
634
|
-
): void;
|
635
|
-
(
|
636
|
-
path: PathLike,
|
637
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
638
|
-
): void;
|
639
|
-
}
|
640
|
-
declare interface ReadlinkSync {
|
641
|
-
(path: PathLike, options?: EncodingOption): string;
|
642
|
-
(path: PathLike, options: BufferEncodingOption): Buffer;
|
643
|
-
(path: PathLike, options?: EncodingOption): string | Buffer;
|
644
|
-
}
|
645
|
-
declare interface RealPath {
|
646
|
-
(
|
647
|
-
path: PathLike,
|
648
|
-
options: EncodingOption,
|
649
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
650
|
-
): void;
|
651
|
-
(
|
652
|
-
path: PathLike,
|
653
|
-
options: BufferEncodingOption,
|
654
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
|
655
|
-
): void;
|
656
|
-
(
|
657
|
-
path: PathLike,
|
658
|
-
options: EncodingOption,
|
659
|
-
callback: (
|
660
|
-
arg0: null | NodeJS.ErrnoException,
|
661
|
-
arg1?: string | Buffer
|
662
|
-
) => void
|
663
|
-
): void;
|
664
|
-
(
|
665
|
-
path: PathLike,
|
666
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
667
|
-
): void;
|
668
|
-
}
|
669
|
-
declare interface RealPathSync {
|
670
|
-
(path: PathLike, options?: EncodingOption): string;
|
671
|
-
(path: PathLike, options: BufferEncodingOption): Buffer;
|
672
|
-
(path: PathLike, options?: EncodingOption): string | Buffer;
|
673
|
-
}
|
674
|
-
declare interface ResolveContext {
|
675
|
-
contextDependencies?: WriteOnlySet<string>;
|
676
|
-
|
677
|
-
/**
|
678
|
-
* files that was found on file system
|
679
|
-
*/
|
680
|
-
fileDependencies?: WriteOnlySet<string>;
|
681
|
-
|
682
|
-
/**
|
683
|
-
* dependencies that was not found on file system
|
684
|
-
*/
|
685
|
-
missingDependencies?: WriteOnlySet<string>;
|
686
|
-
|
687
|
-
/**
|
688
|
-
* set of hooks' calls. For instance, `resolve → parsedResolve → describedResolve`,
|
689
|
-
*/
|
690
|
-
stack?: Set<string>;
|
691
|
-
|
692
|
-
/**
|
693
|
-
* log function
|
694
|
-
*/
|
695
|
-
log?: (arg0: string) => void;
|
696
|
-
|
697
|
-
/**
|
698
|
-
* yield result, if provided plugins can return several results
|
699
|
-
*/
|
700
|
-
yield?: (arg0: ResolveRequest) => void;
|
701
|
-
}
|
702
|
-
declare interface ResolveFunction {
|
703
|
-
(context: object, path: string, request: string): string | false;
|
704
|
-
(path: string, request: string): string | false;
|
705
|
-
}
|
706
|
-
declare interface ResolveFunctionAsync {
|
707
|
-
(
|
708
|
-
context: object,
|
709
|
-
path: string,
|
710
|
-
request: string,
|
711
|
-
resolveContext: ResolveContext,
|
712
|
-
callback: (
|
713
|
-
err: null | ErrorWithDetail,
|
714
|
-
res?: string | false,
|
715
|
-
req?: ResolveRequest
|
716
|
-
) => void
|
717
|
-
): void;
|
718
|
-
(
|
719
|
-
context: object,
|
720
|
-
path: string,
|
721
|
-
request: string,
|
722
|
-
callback: (
|
723
|
-
err: null | ErrorWithDetail,
|
724
|
-
res?: string | false,
|
725
|
-
req?: ResolveRequest
|
726
|
-
) => void
|
727
|
-
): void;
|
728
|
-
(
|
729
|
-
path: string,
|
730
|
-
request: string,
|
731
|
-
resolveContext: ResolveContext,
|
732
|
-
callback: (
|
733
|
-
err: null | ErrorWithDetail,
|
734
|
-
res?: string | false,
|
735
|
-
req?: ResolveRequest
|
736
|
-
) => void
|
737
|
-
): void;
|
738
|
-
(
|
739
|
-
path: string,
|
740
|
-
request: string,
|
741
|
-
callback: (
|
742
|
-
err: null | ErrorWithDetail,
|
743
|
-
res?: string | false,
|
744
|
-
req?: ResolveRequest
|
745
|
-
) => void
|
746
|
-
): void;
|
747
|
-
}
|
748
|
-
type ResolveOptionsOptionalFS = Omit<
|
749
|
-
ResolveOptionsResolverFactoryObject_2,
|
750
|
-
"fileSystem"
|
751
|
-
> &
|
752
|
-
Partial<Pick<ResolveOptionsResolverFactoryObject_2, "fileSystem">>;
|
753
|
-
declare interface ResolveOptionsResolverFactoryObject_1 {
|
754
|
-
alias: AliasOption[];
|
755
|
-
fallback: AliasOption[];
|
756
|
-
aliasFields: Set<string | string[]>;
|
757
|
-
extensionAlias: ExtensionAliasOption[];
|
758
|
-
cachePredicate: (arg0: ResolveRequest) => boolean;
|
759
|
-
cacheWithContext: boolean;
|
760
|
-
|
761
|
-
/**
|
762
|
-
* A list of exports field condition names.
|
763
|
-
*/
|
764
|
-
conditionNames: Set<string>;
|
765
|
-
descriptionFiles: string[];
|
766
|
-
enforceExtension: boolean;
|
767
|
-
exportsFields: Set<string | string[]>;
|
768
|
-
importsFields: Set<string | string[]>;
|
769
|
-
extensions: Set<string>;
|
770
|
-
fileSystem: FileSystem;
|
771
|
-
unsafeCache: false | object;
|
772
|
-
symlinks: boolean;
|
773
|
-
resolver?: Resolver;
|
774
|
-
modules: (string | string[])[];
|
775
|
-
mainFields: { name: string[]; forceRelative: boolean }[];
|
776
|
-
mainFiles: Set<string>;
|
777
|
-
plugins: Plugin[];
|
778
|
-
pnpApi: null | PnpApi;
|
779
|
-
roots: Set<string>;
|
780
|
-
fullySpecified: boolean;
|
781
|
-
resolveToContext: boolean;
|
782
|
-
restrictions: Set<string | RegExp>;
|
783
|
-
preferRelative: boolean;
|
784
|
-
preferAbsolute: boolean;
|
785
|
-
}
|
786
|
-
declare interface ResolveOptionsResolverFactoryObject_2 {
|
787
|
-
/**
|
788
|
-
* A list of module alias configurations or an object which maps key to value
|
789
|
-
*/
|
790
|
-
alias?: AliasOptions | AliasOption[];
|
791
|
-
|
792
|
-
/**
|
793
|
-
* A list of module alias configurations or an object which maps key to value, applied only after modules option
|
794
|
-
*/
|
795
|
-
fallback?: AliasOptions | AliasOption[];
|
796
|
-
|
797
|
-
/**
|
798
|
-
* An object which maps extension to extension aliases
|
799
|
-
*/
|
800
|
-
extensionAlias?: ExtensionAliasOptions;
|
801
|
-
|
802
|
-
/**
|
803
|
-
* A list of alias fields in description files
|
804
|
-
*/
|
805
|
-
aliasFields?: (string | string[])[];
|
806
|
-
|
807
|
-
/**
|
808
|
-
* A function which decides whether a request should be cached or not. An object is passed with at least `path` and `request` properties.
|
809
|
-
*/
|
810
|
-
cachePredicate?: (arg0: ResolveRequest) => boolean;
|
811
|
-
|
812
|
-
/**
|
813
|
-
* Whether or not the unsafeCache should include request context as part of the cache key.
|
814
|
-
*/
|
815
|
-
cacheWithContext?: boolean;
|
816
|
-
|
817
|
-
/**
|
818
|
-
* A list of description files to read from
|
819
|
-
*/
|
820
|
-
descriptionFiles?: string[];
|
821
|
-
|
822
|
-
/**
|
823
|
-
* A list of exports field condition names.
|
824
|
-
*/
|
825
|
-
conditionNames?: string[];
|
826
|
-
|
827
|
-
/**
|
828
|
-
* Enforce that a extension from extensions must be used
|
829
|
-
*/
|
830
|
-
enforceExtension?: boolean;
|
831
|
-
|
832
|
-
/**
|
833
|
-
* A list of exports fields in description files
|
834
|
-
*/
|
835
|
-
exportsFields?: (string | string[])[];
|
836
|
-
|
837
|
-
/**
|
838
|
-
* A list of imports fields in description files
|
839
|
-
*/
|
840
|
-
importsFields?: (string | string[])[];
|
841
|
-
|
842
|
-
/**
|
843
|
-
* A list of extensions which should be tried for files
|
844
|
-
*/
|
845
|
-
extensions?: string[];
|
846
|
-
|
847
|
-
/**
|
848
|
-
* The file system which should be used
|
849
|
-
*/
|
850
|
-
fileSystem: FileSystem;
|
851
|
-
|
852
|
-
/**
|
853
|
-
* Use this cache object to unsafely cache the successful requests
|
854
|
-
*/
|
855
|
-
unsafeCache?: boolean | object;
|
856
|
-
|
857
|
-
/**
|
858
|
-
* Resolve symlinks to their symlinked location
|
859
|
-
*/
|
860
|
-
symlinks?: boolean;
|
861
|
-
|
862
|
-
/**
|
863
|
-
* A prepared Resolver to which the plugins are attached
|
864
|
-
*/
|
865
|
-
resolver?: Resolver;
|
866
|
-
|
867
|
-
/**
|
868
|
-
* A list of directories to resolve modules from, can be absolute path or folder name
|
869
|
-
*/
|
870
|
-
modules?: string | string[];
|
871
|
-
|
872
|
-
/**
|
873
|
-
* A list of main fields in description files
|
874
|
-
*/
|
875
|
-
mainFields?: (
|
876
|
-
| string
|
877
|
-
| string[]
|
878
|
-
| { name: string | string[]; forceRelative: boolean }
|
879
|
-
)[];
|
880
|
-
|
881
|
-
/**
|
882
|
-
* A list of main files in directories
|
883
|
-
*/
|
884
|
-
mainFiles?: string[];
|
885
|
-
|
886
|
-
/**
|
887
|
-
* A list of additional resolve plugins which should be applied
|
888
|
-
*/
|
889
|
-
plugins?: Plugin[];
|
890
|
-
|
891
|
-
/**
|
892
|
-
* A PnP API that should be used - null is "never", undefined is "auto"
|
893
|
-
*/
|
894
|
-
pnpApi?: null | PnpApi;
|
895
|
-
|
896
|
-
/**
|
897
|
-
* A list of root paths
|
898
|
-
*/
|
899
|
-
roots?: string[];
|
900
|
-
|
901
|
-
/**
|
902
|
-
* The request is already fully specified and no extensions or directories are resolved for it
|
903
|
-
*/
|
904
|
-
fullySpecified?: boolean;
|
905
|
-
|
906
|
-
/**
|
907
|
-
* Resolve to a context instead of a file
|
908
|
-
*/
|
909
|
-
resolveToContext?: boolean;
|
910
|
-
|
911
|
-
/**
|
912
|
-
* A list of resolve restrictions
|
913
|
-
*/
|
914
|
-
restrictions?: (string | RegExp)[];
|
915
|
-
|
916
|
-
/**
|
917
|
-
* Use only the sync constraints of the file system calls
|
918
|
-
*/
|
919
|
-
useSyncFileSystemCalls?: boolean;
|
920
|
-
|
921
|
-
/**
|
922
|
-
* Prefer to resolve module requests as relative requests before falling back to modules
|
923
|
-
*/
|
924
|
-
preferRelative?: boolean;
|
925
|
-
|
926
|
-
/**
|
927
|
-
* Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots
|
928
|
-
*/
|
929
|
-
preferAbsolute?: boolean;
|
930
|
-
}
|
931
|
-
type ResolveRequest = BaseResolveRequest & Partial<ParsedIdentifier>;
|
932
|
-
declare abstract class Resolver {
|
933
|
-
fileSystem: FileSystem;
|
934
|
-
options: ResolveOptionsResolverFactoryObject_1;
|
935
|
-
hooks: KnownHooks;
|
936
|
-
ensureHook(
|
937
|
-
name:
|
938
|
-
| string
|
939
|
-
| AsyncSeriesBailHook<
|
940
|
-
[ResolveRequest, ResolveContext],
|
941
|
-
null | ResolveRequest
|
942
|
-
>
|
943
|
-
): AsyncSeriesBailHook<
|
944
|
-
[ResolveRequest, ResolveContext],
|
945
|
-
null | ResolveRequest
|
946
|
-
>;
|
947
|
-
getHook(
|
948
|
-
name:
|
949
|
-
| string
|
950
|
-
| AsyncSeriesBailHook<
|
951
|
-
[ResolveRequest, ResolveContext],
|
952
|
-
null | ResolveRequest
|
953
|
-
>
|
954
|
-
): AsyncSeriesBailHook<
|
955
|
-
[ResolveRequest, ResolveContext],
|
956
|
-
null | ResolveRequest
|
957
|
-
>;
|
958
|
-
resolveSync(context: object, path: string, request: string): string | false;
|
959
|
-
resolve(
|
960
|
-
context: object,
|
961
|
-
path: string,
|
962
|
-
request: string,
|
963
|
-
resolveContext: ResolveContext,
|
964
|
-
callback: (
|
965
|
-
err: null | ErrorWithDetail,
|
966
|
-
res?: string | false,
|
967
|
-
req?: ResolveRequest
|
968
|
-
) => void
|
969
|
-
): void;
|
970
|
-
doResolve(
|
971
|
-
hook: AsyncSeriesBailHook<
|
972
|
-
[ResolveRequest, ResolveContext],
|
973
|
-
null | ResolveRequest
|
974
|
-
>,
|
975
|
-
request: ResolveRequest,
|
976
|
-
message: null | string,
|
977
|
-
resolveContext: ResolveContext,
|
978
|
-
callback: (err?: null | Error, result?: ResolveRequest) => void
|
979
|
-
): void;
|
980
|
-
parse(identifier: string): ParsedIdentifier;
|
981
|
-
isModule(path: string): boolean;
|
982
|
-
isPrivate(path: string): boolean;
|
983
|
-
isDirectory(path: string): boolean;
|
984
|
-
join(path: string, request: string): string;
|
985
|
-
normalize(path: string): string;
|
986
|
-
}
|
987
|
-
declare interface Stat {
|
988
|
-
(
|
989
|
-
path: PathLike,
|
990
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
991
|
-
): void;
|
992
|
-
(
|
993
|
-
path: PathLike,
|
994
|
-
options: undefined | (StatOptions & { bigint?: false }),
|
995
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
996
|
-
): void;
|
997
|
-
(
|
998
|
-
path: PathLike,
|
999
|
-
options: StatOptions & { bigint: true },
|
1000
|
-
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IBigIntStats) => void
|
1001
|
-
): void;
|
1002
|
-
(
|
1003
|
-
path: PathLike,
|
1004
|
-
options: undefined | StatOptions,
|
1005
|
-
callback: (
|
1006
|
-
arg0: null | NodeJS.ErrnoException,
|
1007
|
-
arg1?: IStats | IBigIntStats
|
1008
|
-
) => void
|
1009
|
-
): void;
|
1010
|
-
}
|
1011
|
-
declare interface StatOptions {
|
1012
|
-
bigint?: boolean;
|
1013
|
-
}
|
1014
|
-
declare interface StatSync {
|
1015
|
-
(path: PathLike, options?: undefined): IStats;
|
1016
|
-
(
|
1017
|
-
path: PathLike,
|
1018
|
-
options?: StatSyncOptions & { bigint?: false; throwIfNoEntry: false }
|
1019
|
-
): undefined | IStats;
|
1020
|
-
(
|
1021
|
-
path: PathLike,
|
1022
|
-
options: StatSyncOptions & { bigint: true; throwIfNoEntry: false }
|
1023
|
-
): undefined | IBigIntStats;
|
1024
|
-
(path: PathLike, options?: StatSyncOptions & { bigint?: false }): IStats;
|
1025
|
-
(path: PathLike, options: StatSyncOptions & { bigint: true }): IBigIntStats;
|
1026
|
-
(
|
1027
|
-
path: PathLike,
|
1028
|
-
options: StatSyncOptions & { bigint: boolean; throwIfNoEntry?: false }
|
1029
|
-
): IStats | IBigIntStats;
|
1030
|
-
(path: PathLike, options?: StatSyncOptions):
|
1031
|
-
| undefined
|
1032
|
-
| IStats
|
1033
|
-
| IBigIntStats;
|
1034
|
-
}
|
1035
|
-
declare interface StatSyncOptions {
|
1036
|
-
bigint?: boolean;
|
1037
|
-
throwIfNoEntry?: boolean;
|
1038
|
-
}
|
1039
|
-
declare interface SyncFileSystem {
|
1040
|
-
readFileSync: ReadFileSync;
|
1041
|
-
readdirSync: ReaddirSync;
|
1042
|
-
readJsonSync?: (arg0: PathOrFileDescriptor) => JsonObject;
|
1043
|
-
readlinkSync: ReadlinkSync;
|
1044
|
-
lstatSync?: LStatSync;
|
1045
|
-
statSync: StatSync;
|
1046
|
-
realpathSync?: RealPathSync;
|
1047
|
-
}
|
1048
|
-
|
1049
|
-
/**
|
1050
|
-
* `URL` class is a global reference for `require('url').URL`
|
1051
|
-
* https://nodejs.org/api/url.html#the-whatwg-url-api
|
1052
|
-
*/
|
1053
|
-
declare interface URL_url extends URL {}
|
1054
|
-
declare interface WriteOnlySet<T> {
|
1055
|
-
add: (item: T) => void;
|
1056
|
-
}
|
1057
|
-
declare function exports(
|
1058
|
-
context: object,
|
1059
|
-
path: string,
|
1060
|
-
request: string,
|
1061
|
-
resolveContext: ResolveContext,
|
1062
|
-
callback: (
|
1063
|
-
err: null | ErrorWithDetail,
|
1064
|
-
res?: string | false,
|
1065
|
-
req?: ResolveRequest
|
1066
|
-
) => void
|
1067
|
-
): void;
|
1068
|
-
declare function exports(
|
1069
|
-
context: object,
|
1070
|
-
path: string,
|
1071
|
-
request: string,
|
1072
|
-
callback: (
|
1073
|
-
err: null | ErrorWithDetail,
|
1074
|
-
res?: string | false,
|
1075
|
-
req?: ResolveRequest
|
1076
|
-
) => void
|
1077
|
-
): void;
|
1078
|
-
declare function exports(
|
1079
|
-
path: string,
|
1080
|
-
request: string,
|
1081
|
-
resolveContext: ResolveContext,
|
1082
|
-
callback: (
|
1083
|
-
err: null | ErrorWithDetail,
|
1084
|
-
res?: string | false,
|
1085
|
-
req?: ResolveRequest
|
1086
|
-
) => void
|
1087
|
-
): void;
|
1088
|
-
declare function exports(
|
1089
|
-
path: string,
|
1090
|
-
request: string,
|
1091
|
-
callback: (
|
1092
|
-
err: null | ErrorWithDetail,
|
1093
|
-
res?: string | false,
|
1094
|
-
req?: ResolveRequest
|
1095
|
-
) => void
|
1096
|
-
): void;
|
1097
|
-
declare namespace exports {
|
1098
|
-
export const sync: ResolveFunction;
|
1099
|
-
export function create(
|
1100
|
-
options: ResolveOptionsOptionalFS
|
1101
|
-
): ResolveFunctionAsync;
|
1102
|
-
export namespace create {
|
1103
|
-
export const sync: (options: ResolveOptionsOptionalFS) => ResolveFunction;
|
1104
|
-
}
|
1105
|
-
export namespace ResolverFactory {
|
1106
|
-
export let createResolver: (
|
1107
|
-
options: ResolveOptionsResolverFactoryObject_2
|
1108
|
-
) => Resolver;
|
1109
|
-
}
|
1110
|
-
export const forEachBail: <T, Z>(
|
1111
|
-
array: T[],
|
1112
|
-
iterator: Iterator<T, Z>,
|
1113
|
-
callback: (err?: null | Error, result?: null | Z, i?: number) => void
|
1114
|
-
) => void;
|
1115
|
-
export type ResolveCallback = (
|
1116
|
-
err: null | ErrorWithDetail,
|
1117
|
-
res?: string | false,
|
1118
|
-
req?: ResolveRequest
|
1119
|
-
) => void;
|
1120
|
-
export { CachedInputFileSystem, CloneBasenamePlugin, LogInfoPlugin, Resolver };
|
1121
|
-
export type { ResolveOptionsOptionalFS, PnpApi, FileSystem, ResolveContext, ResolveRequest, Plugin, ResolveOptionsResolverFactoryObject_2 as ResolveOptions, ResolveFunctionAsync, ResolveFunction };
|
1122
|
-
}
|
1123
|
-
|
1124
|
-
export { exports as default };
|