@@ -514,7 +514,7 @@ class Encore {
514
514
* * `name` set to the value of the "name" parameter
515
515
*
516
516
* @param {string } name The chunk name (e.g. vendor to create a vendor.js)
517
- * @param {object } options Cache group option
517
+ * @param {webpack.Options.CacheGroupsOptions&{node_modules?: string[]} } options Cache group option
518
518
* @returns {Encore }
519
519
*/
520
520
addCacheGroup ( name , options ) {
@@ -523,6 +523,10 @@ class Encore {
523
523
return this ;
524
524
}
525
525
526
+ /**
527
+ * @typedef {{from: string, pattern?: RegExp|string, to?: string, includeSubdirectories?: boolean, context?: string} } CopyFilesOptions
528
+ */
529
+
526
530
/**
527
531
* Copy files or folders to the build directory.
528
532
*
@@ -583,7 +587,7 @@ class Encore {
583
587
* * {string} context (default: path of the source directory)
584
588
* The context to use as a root path when copying files.
585
589
*
586
- * @param {object|Array } configs
590
+ * @param {CopyFilesOptions|CopyFilesOptions[] } configs
587
591
* @returns {Encore }
588
592
*/
589
593
copyFiles ( configs ) {
@@ -831,7 +835,7 @@ class Encore {
831
835
* // https://www.npmjs.com/package/resolve-url-loader#options
832
836
*
833
837
* @param {function(object): object|void } sassLoaderOptionsCallback
834
- * @param {object } encoreOptions
838
+ * @param {{resolveUrlLoader?: boolean, resolveUrlLoaderOptions?: object} } encoreOptions
835
839
* @returns {Encore }
836
840
*/
837
841
enableSassLoader ( sassLoaderOptionsCallback = ( ) => { } , encoreOptions = { } ) {
@@ -963,7 +967,7 @@ class Encore {
963
967
* if useBuiltIns isn't set to false.
964
968
*
965
969
* @param {(function(object): object|void)|null } callback
966
- * @param {object } encoreOptions
970
+ * @param {{exclude?: webpack.RuleSetCondition, includeNodeModules?: string[], useBuiltIns?: 'usage' | 'entry' | false, corejs?: number|string| object} } encoreOptions
967
971
* @returns {Encore }
968
972
*/
969
973
configureBabel ( callback , encoreOptions = { } ) {
@@ -1058,7 +1062,7 @@ class Encore {
1058
1062
* Encore.enablePreactPreset({ preactCompat: true })
1059
1063
* ```
1060
1064
*
1061
- * @param {object } options
1065
+ * @param {{preactCompat?: boolean} } options
1062
1066
* @returns {Encore }
1063
1067
*/
1064
1068
enablePreactPreset ( options = { } ) {
@@ -1190,7 +1194,7 @@ class Encore {
1190
1194
* in order to enable JSX usage in Vue components.
1191
1195
*
1192
1196
* @param {function(object): object|void } vueLoaderOptionsCallback
1193
- * @param {object } encoreOptions
1197
+ * @param {{useJsx?: boolean, version?: number, runtimeCompilerBuild?: boolean} } encoreOptions
1194
1198
* @returns {Encore }
1195
1199
*/
1196
1200
enableVueLoader ( vueLoaderOptionsCallback = ( ) => { } , encoreOptions = { } ) {
@@ -1236,7 +1240,7 @@ class Encore {
1236
1240
* ```
1237
1241
*
1238
1242
* @param {string|object|(function(object): object|void) } eslintLoaderOptionsOrCallback
1239
- * @param {object } encoreOptions
1243
+ * @param {{lintVue?: boolean} } encoreOptions
1240
1244
* @returns {Encore }
1241
1245
*/
1242
1246
enableEslintLoader ( eslintLoaderOptionsOrCallback = ( ) => { } , encoreOptions = { } ) {
@@ -1378,7 +1382,7 @@ class Encore {
1378
1382
* make sure that your "js" and "css" filenames contain
1379
1383
* "[contenthash]".
1380
1384
*
1381
- * @param {object } filenames
1385
+ * @param {{js?: string, css?: string, images?: string, fonts?: string} } filenames
1382
1386
* @returns {Encore }
1383
1387
*/
1384
1388
configureFilenames ( filenames ) {
@@ -1407,7 +1411,7 @@ class Encore {
1407
1411
* If a key (e.g. fonts) doesn't exists or contains a
1408
1412
* falsy value the file-loader will be used instead.
1409
1413
*
1410
- * @param {object } urlLoaderOptions
1414
+ * @param {{images?: false| object, fonts?: false|object} } urlLoaderOptions
1411
1415
* @return {Encore }
1412
1416
*/
1413
1417
configureUrlLoader ( urlLoaderOptions = { } ) {
0 commit comments