Skip to content

Commit

Permalink
Fix some type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
andy128k committed Oct 13, 2022
1 parent 3440b1d commit 4433b79
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,22 +302,22 @@ class FaviconsWebpackPlugin {
/**
* Generate the favicons
*
* @param {{content: Buffer | string, hash: string}} logo
* @param {{content: Buffer | string, hash: string}[]} logoFileSources
* @param {Buffer | string} baseManifest - the content of the file from options.manifest
* @param {import('webpack').Compilation} compilation
* @param {string} outputPath
*/
generateFavicons(logoFileSources, baseManifest, compilation, outputPath) {
const logoFileSourceContents = logoFileSources.map(
(source) => source.content
);

const resolvedPublicPath = getResolvedPublicPath(
getContentHash(...logoFileSources.map((s) => s.content)),
getContentHash(...logoFileSourceContents),
compilation,
this.options
);

const logoFileSourceContents = logoFileSources.map(
(source) => source.content
);

/** @type {{[key: string]: any}} - the parsed manifest from options.manifest */
const parsedBaseManifest =
typeof this.options.manifest === 'string'
Expand Down Expand Up @@ -358,7 +358,7 @@ class FaviconsWebpackPlugin {
* this is very fast but also very limited
* it is the default mode for development
*
* @param {Buffer | string} logoSource
* @param {(Buffer | string)[]} logoFileSources
* @param {{[key: string]: any}} baseManifest
* @param {import('webpack').Compilation} compilation
* @param {string} resolvedPublicPath
Expand Down Expand Up @@ -417,7 +417,7 @@ class FaviconsWebpackPlugin {
* this is not as fast as the light mode but
* supports all common browsers and devices
*
* @param {Buffer | string} logoSource
* @param {(Buffer | string)[]} logoFileSources
* @param {{[key: string]: any}} baseManifest
* @param {import('webpack').Compilation} compilation
* @param {string} resolvedPublicPath
Expand Down

0 comments on commit 4433b79

Please sign in to comment.