File tree 3 files changed +8
-3
lines changed
3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -549,10 +549,10 @@ Type:
549
549
``` ts
550
550
type transform =
551
551
| {
552
- transformer: (input : string , absoluteFilename : string ) => string ;
552
+ transformer: (input : string , absoluteFilename : string ) => string | Buffer ;
553
553
cache? : boolean | TransformerCacheObject | undefined ;
554
554
}
555
- | ((input : string , absoluteFilename : string ) => string );
555
+ | ((input : string , absoluteFilename : string ) => string | Buffer );
556
556
```
557
557
558
558
Default: ` undefined `
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ const template = /\[\\*([\w:]+)\\*\]/i;
74
74
* @callback TransformerFunction
75
75
* @param {Buffer } input
76
76
* @param {string } absoluteFilename
77
+ * @returns {string | Buffer }
77
78
*/
78
79
79
80
/**
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ export = CopyPlugin;
49
49
* @callback TransformerFunction
50
50
* @param {Buffer } input
51
51
* @param {string } absoluteFilename
52
+ * @returns {string | Buffer }
52
53
*/
53
54
/**
54
55
* @typedef {{ keys: { [key: string]: any } } | { keys: ((defaultCacheKeys: { [key: string]: any }, absoluteFilename: string) => Promise<{ [key: string]: any }>) } } TransformerCacheObject
@@ -229,7 +230,10 @@ type ToFunction = (pathData: {
229
230
} ) => string ;
230
231
type To = string | ToFunction ;
231
232
type ToType = "dir" | "file" | "template" ;
232
- type TransformerFunction = ( input : Buffer , absoluteFilename : string ) => any ;
233
+ type TransformerFunction = (
234
+ input : Buffer ,
235
+ absoluteFilename : string
236
+ ) => string | Buffer ;
233
237
type TransformerCacheObject =
234
238
| {
235
239
keys : {
You can’t perform that action at this time.
0 commit comments