From 12d8ac324d50743485e79c72e947860400867477 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Sun, 6 Oct 2024 08:10:01 -0400 Subject: [PATCH] refactor: add types Signed-off-by: Adam Setch --- scripts/notarize.js | 4 ++++ scripts/remove-unused-locales.js | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/notarize.js b/scripts/notarize.js index 58d40d62e..f8635385d 100644 --- a/scripts/notarize.js +++ b/scripts/notarize.js @@ -1,4 +1,5 @@ const { notarize } = require('@electron/notarize'); +const { AfterPackContext } = require('electron-builder'); const packageJson = require('../package.json'); const appBundleId = packageJson.build.appId; @@ -8,6 +9,9 @@ function logNotarizingProgress(msg) { console.log(` • notarizing ${msg}`); } +/** + * @param {AfterPackContext} context + */ const notarizeApp = async (context) => { const { electronPlatformName, appOutDir } = context; const appName = context.packager.appInfo.productFilename; diff --git a/scripts/remove-unused-locales.js b/scripts/remove-unused-locales.js index c5494d58a..fadaa9bbc 100644 --- a/scripts/remove-unused-locales.js +++ b/scripts/remove-unused-locales.js @@ -1,10 +1,14 @@ const path = require('node:path'); const fs = require('node:fs'); +const { AfterPackContext } = require('electron-builder'); const packageJson = require('../package.json'); const electronLanguages = packageJson.build.electronLanguages; -exports.default = async (context) => { +/** + * @param {AfterPackContext} context + */ +const removeLocales = async (context) => { const appName = context.packager.appInfo.productFilename; const appOutDir = context.appOutDir; const platform = context.electronPlatformName; @@ -39,3 +43,5 @@ exports.default = async (context) => { } } }; + +exports.default = removeLocales;