diff --git a/src/main/fonts.js b/src/main/fonts.ts similarity index 70% rename from src/main/fonts.js rename to src/main/fonts.ts index 03c977c6..345ca90b 100644 --- a/src/main/fonts.js +++ b/src/main/fonts.ts @@ -1,9 +1,9 @@ import SystemFonts from 'system-font-families' -const fonts = () => { +const fonts = async (): Promise> => { const systemFonts = new SystemFonts() return systemFonts.getFonts() - .then(res => { + .then((res: string) => { return Array.from(new Set(res)).sort() }) } diff --git a/src/main/index.ts b/src/main/index.ts index 82e1f13a..66922c15 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -801,7 +801,7 @@ ipcMain.on('remove-hashtag', (event, tag) => { }) // Fonts -ipcMain.on('list-fonts', (event, _) => { +ipcMain.on('list-fonts', (event: Event, _) => { Fonts() .then(list => { event.sender.send('response-list-fonts', list)