From 403fa35af4f4fc8944bd9fc64e8e64a25cbc274a Mon Sep 17 00:00:00 2001 From: hensm Date: Mon, 15 Aug 2022 15:08:14 +0100 Subject: [PATCH] Fix build script type errors --- ext/bin/build.js | 2 +- ext/bin/lib/copyFilesPlugin.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/bin/build.js b/ext/bin/build.js index e91d045..0e7af3e 100644 --- a/ext/bin/build.js +++ b/ext/bin/build.js @@ -102,7 +102,7 @@ if (argv.mode === "production") { /** * Handle build results. * - * @param {esbuild.BuildResult} result + * @param {esbuild.BuildResult | null} result */ function onBuildResult(result) { if (result?.errors.length) { diff --git a/ext/bin/lib/copyFilesPlugin.js b/ext/bin/lib/copyFilesPlugin.js index f6b22ea..7e68cf5 100644 --- a/ext/bin/lib/copyFilesPlugin.js +++ b/ext/bin/lib/copyFilesPlugin.js @@ -14,7 +14,7 @@ const esbuild = require("esbuild"); function* walk(rootPath) { const pathsToWalk = [rootPath]; while (pathsToWalk.length > 0) { - const currentPath = pathsToWalk.pop(); + const currentPath = /** @type {string} */ (pathsToWalk.pop()); if (fs.statSync(currentPath).isFile()) { yield currentPath; } else {