@@ -20,7 +20,7 @@ export = CopyPlugin;
20
20
* @property {string } filename
21
21
* @property {Asset["source"] } source
22
22
* @property {Force | undefined } force
23
- * @property {{ [key: string]: any } } info
23
+ * @property {Record< string, any> } info
24
24
*/
25
25
/**
26
26
* @typedef {string } StringPattern
@@ -73,7 +73,7 @@ export = CopyPlugin;
73
73
* @returns {string | Buffer | Promise<string> | Promise<Buffer> }
74
74
*/
75
75
/**
76
- * @typedef { { [key: string]: string } | ((item: { absoluteFilename: string, sourceFilename: string, filename: string, toType: ToType }) => { [key: string]: string } ) } Info
76
+ * @typedef { Record< string, any> | ((item: { absoluteFilename: string, sourceFilename: string, filename: string, toType: ToType }) => Record< string, any> ) } Info
77
77
*/
78
78
/**
79
79
* @typedef {Object } ObjectPattern
@@ -216,9 +216,7 @@ type CopiedResult = {
216
216
filename : string ;
217
217
source : Asset [ "source" ] ;
218
218
force : Force | undefined ;
219
- info : {
220
- [ key : string ] : any ;
221
- } ;
219
+ info : Record < string , any > ;
222
220
} ;
223
221
type StringPattern = string ;
224
222
type NoErrorOnMissing = boolean ;
@@ -264,17 +262,13 @@ type TransformAllFunction = (
264
262
} [ ]
265
263
) => string | Buffer | Promise < string > | Promise < Buffer > ;
266
264
type Info =
267
- | {
268
- [ key : string ] : string ;
269
- }
265
+ | Record < string , any >
270
266
| ( ( item : {
271
267
absoluteFilename : string ;
272
268
sourceFilename : string ;
273
269
filename : string ;
274
270
toType : ToType ;
275
- } ) => {
276
- [ key : string ] : string ;
277
- } ) ;
271
+ } ) => Record < string , any > ) ;
278
272
type ObjectPattern = {
279
273
from : From ;
280
274
globOptions ?: import ( "globby" ) . Options | undefined ;
0 commit comments