@@ -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 ) {
@@ -830,7 +834,7 @@ class Encore {
830
834
* // https://www.npmjs.com/package/resolve-url-loader#options
831
835
*
832
836
* @param {function(object): object|void } sassLoaderOptionsCallback
833
- * @param {object } encoreOptions
837
+ * @param {{resolveUrlLoader?: boolean, resolveUrlLoaderOptions?: object} } encoreOptions
834
838
* @returns {Encore }
835
839
*/
836
840
enableSassLoader ( sassLoaderOptionsCallback = ( ) => { } , encoreOptions = { } ) {
@@ -962,7 +966,7 @@ class Encore {
962
966
* if useBuiltIns isn't set to false.
963
967
*
964
968
* @param {(function(object): object|void)|null } callback
965
- * @param {object } encoreOptions
969
+ * @param {{exclude?: webpack.RuleSetCondition, includeNodeModules?: string[], useBuiltIns?: 'usage' | 'entry' | false, corejs?: number|string| object} } encoreOptions
966
970
* @returns {Encore }
967
971
*/
968
972
configureBabel ( callback , encoreOptions = { } ) {
@@ -1045,7 +1049,7 @@ class Encore {
1045
1049
* Encore.enablePreactPreset({ preactCompat: true })
1046
1050
* ```
1047
1051
*
1048
- * @param {object } options
1052
+ * @param {{preactCompat?: boolean} } options
1049
1053
* @returns {Encore }
1050
1054
*/
1051
1055
enablePreactPreset ( options = { } ) {
@@ -1177,7 +1181,7 @@ class Encore {
1177
1181
* in order to enable JSX usage in Vue components.
1178
1182
*
1179
1183
* @param {function(object): object|void } vueLoaderOptionsCallback
1180
- * @param {object } encoreOptions
1184
+ * @param {{useJsx?: boolean, version?: number, runtimeCompilerBuild?: boolean} } encoreOptions
1181
1185
* @returns {Encore }
1182
1186
*/
1183
1187
enableVueLoader ( vueLoaderOptionsCallback = ( ) => { } , encoreOptions = { } ) {
@@ -1223,7 +1227,7 @@ class Encore {
1223
1227
* ```
1224
1228
*
1225
1229
* @param {string|object|(function(object): object|void) } eslintLoaderOptionsOrCallback
1226
- * @param {object } encoreOptions
1230
+ * @param {{lintVue?: boolean} } encoreOptions
1227
1231
* @returns {Encore }
1228
1232
*/
1229
1233
enableEslintLoader ( eslintLoaderOptionsOrCallback = ( ) => { } , encoreOptions = { } ) {
@@ -1365,7 +1369,7 @@ class Encore {
1365
1369
* make sure that your "js" and "css" filenames contain
1366
1370
* "[contenthash]".
1367
1371
*
1368
- * @param {object } filenames
1372
+ * @param {{js?: string, css?: string, images?: string, fonts?: string} } filenames
1369
1373
* @returns {Encore }
1370
1374
*/
1371
1375
configureFilenames ( filenames ) {
@@ -1394,7 +1398,7 @@ class Encore {
1394
1398
* If a key (e.g. fonts) doesn't exists or contains a
1395
1399
* falsy value the file-loader will be used instead.
1396
1400
*
1397
- * @param {object } urlLoaderOptions
1401
+ * @param {{images?: false| object, fonts?: false|object} } urlLoaderOptions
1398
1402
* @return {Encore }
1399
1403
*/
1400
1404
configureUrlLoader ( urlLoaderOptions = { } ) {
0 commit comments