@@ -519,7 +519,7 @@ class Encore {
519
519
* - `name` set to the value of the "name" parameter
520
520
*
521
521
* @param {string } name The chunk name (e.g. vendor to create a vendor.js)
522
- * @param {object } options Cache group option
522
+ * @param {webpack.Options.CacheGroupsOptions&{node_modules?: string[]} } options Cache group option
523
523
* @returns {Encore }
524
524
*/
525
525
addCacheGroup ( name , options ) {
@@ -528,6 +528,10 @@ class Encore {
528
528
return this ;
529
529
}
530
530
531
+ /**
532
+ * @typedef {{from: string, pattern?: RegExp|string, to?: string, includeSubdirectories?: boolean, context?: string} } CopyFilesOptions
533
+ */
534
+
531
535
/**
532
536
* Copy files or folders to the build directory.
533
537
*
@@ -588,7 +592,7 @@ class Encore {
588
592
* - {string} context (default: path of the source directory)
589
593
* The context to use as a root path when copying files.
590
594
*
591
- * @param {object|Array } configs
595
+ * @param {CopyFilesOptions|CopyFilesOptions[] } configs
592
596
* @returns {Encore }
593
597
*/
594
598
copyFiles ( configs ) {
@@ -839,7 +843,7 @@ class Encore {
839
843
* // https://www.npmjs.com/package/resolve-url-loader#options
840
844
*
841
845
* @param {OptionsCallback<object> } sassLoaderOptionsCallback
842
- * @param {object } encoreOptions
846
+ * @param {{resolveUrlLoader?: boolean, resolveUrlLoaderOptions?: object} } encoreOptions
843
847
* @returns {Encore }
844
848
*/
845
849
enableSassLoader ( sassLoaderOptionsCallback = ( ) => { } , encoreOptions = { } ) {
@@ -971,7 +975,7 @@ class Encore {
971
975
* if useBuiltIns isn't set to false.
972
976
*
973
977
* @param {OptionsCallback<object>|null } callback
974
- * @param {object } encoreOptions
978
+ * @param {{exclude?: webpack.RuleSetCondition, includeNodeModules?: string[], useBuiltIns?: 'usage' | 'entry' | false, corejs?: number|string| object} } encoreOptions
975
979
* @returns {Encore }
976
980
*/
977
981
configureBabel ( callback , encoreOptions = { } ) {
@@ -1125,7 +1129,7 @@ class Encore {
1125
1129
* Encore.enablePreactPreset({ preactCompat: true })
1126
1130
* ```
1127
1131
*
1128
- * @param {object } options
1132
+ * @param {{preactCompat?: boolean} } options
1129
1133
* @returns {Encore }
1130
1134
*/
1131
1135
enablePreactPreset ( options = { } ) {
@@ -1257,7 +1261,7 @@ class Encore {
1257
1261
* in order to enable JSX usage in Vue components.
1258
1262
*
1259
1263
* @param {OptionsCallback<object> } vueLoaderOptionsCallback
1260
- * @param {object } encoreOptions
1264
+ * @param {{useJsx?: boolean, version?: number, runtimeCompilerBuild?: boolean} } encoreOptions
1261
1265
* @returns {Encore }
1262
1266
*/
1263
1267
enableVueLoader ( vueLoaderOptionsCallback = ( ) => { } , encoreOptions = { } ) {
@@ -1387,7 +1391,7 @@ class Encore {
1387
1391
* which is overridden for both fonts and images. See configureImageRule()
1388
1392
* and configureFontRule() to control those filenames.
1389
1393
*
1390
- * @param {object } filenames
1394
+ * @param {{js?: string, css?: string, images?: string, fonts?: string} } filenames
1391
1395
* @returns {Encore }
1392
1396
*/
1393
1397
configureFilenames ( filenames ) {
0 commit comments