From be5b1d637f390bf130bb9d035905b82348690db7 Mon Sep 17 00:00:00 2001 From: Core <64542347+coredev-uk@users.noreply.github.com> Date: Thu, 3 Mar 2022 09:46:00 +0000 Subject: [PATCH] typescript is the best thing ever and everyone should use it --- src/main/base/browserwindow.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/base/browserwindow.ts b/src/main/base/browserwindow.ts index e4abb8e8..b629ef8b 100644 --- a/src/main/base/browserwindow.ts +++ b/src/main/base/browserwindow.ts @@ -428,9 +428,8 @@ export class BrowserWindow { } }); - app.get("/themes/:theme/*", (req, res) => { + app.get("/themes/:theme/*", (req: {params: {theme: string, 0: string}}, res) => { const theme = req.params.theme; - // @ts-ignore const file = req.params[0]; const themePath = join(utils.getPath('srcPath'), "./renderer/themes/", theme); const userThemePath = join(utils.getPath('themes'), theme); @@ -443,9 +442,8 @@ export class BrowserWindow { } }); - app.get("/plugins/:plugin/*", (req, res) => { + app.get("/plugins/:plugin/*", (req: {params: {plugin: string, 0: string}}, res) => { const plugin = req.params.plugin; - // @ts-ignore const file = req.params[0]; const pluginPath = join(utils.getPath('plugins'), plugin); console.log(pluginPath) @@ -976,7 +974,6 @@ export class BrowserWindow { title: 'Share', urls: [url] }; - // @ts-ignore const shareMenu = new ShareMenu(options); shareMenu.popup(); })