From 60e1afe19cc6bc731b5ad071a05d57190935200c Mon Sep 17 00:00:00 2001 From: Legends Date: Thu, 14 Jun 2018 16:51:20 +0200 Subject: [PATCH 1/2] AutomaticPrefetchPlugin typings added --- lib/AutomaticPrefetchPlugin.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/AutomaticPrefetchPlugin.js b/lib/AutomaticPrefetchPlugin.js index 4efb350ce95..551e1fd57e9 100644 --- a/lib/AutomaticPrefetchPlugin.js +++ b/lib/AutomaticPrefetchPlugin.js @@ -9,6 +9,11 @@ const PrefetchDependency = require("./dependencies/PrefetchDependency"); const NormalModule = require("./NormalModule"); class AutomaticPrefetchPlugin { + /** + * Apply the plugin + * @param {TODO} compiler Webpack Compiler + * @returns {void} + */ apply(compiler) { compiler.hooks.compilation.tap( "AutomaticPrefetchPlugin", From b03804eabf7a75d65ab8b2a610a6637150992cba Mon Sep 17 00:00:00 2001 From: Legends Date: Thu, 21 Jun 2018 12:39:48 +0200 Subject: [PATCH 2/2] added Compiler, @returns void --- lib/AutomaticPrefetchPlugin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/AutomaticPrefetchPlugin.js b/lib/AutomaticPrefetchPlugin.js index 551e1fd57e9..26123de53f5 100644 --- a/lib/AutomaticPrefetchPlugin.js +++ b/lib/AutomaticPrefetchPlugin.js @@ -8,10 +8,12 @@ const asyncLib = require("neo-async"); const PrefetchDependency = require("./dependencies/PrefetchDependency"); const NormalModule = require("./NormalModule"); +/** @typedef {import("./Compiler.js")} Compiler */ + class AutomaticPrefetchPlugin { /** * Apply the plugin - * @param {TODO} compiler Webpack Compiler + * @param {Compiler} compiler Webpack Compiler * @returns {void} */ apply(compiler) {