refs #850 Replace fonts with typescript
This commit is contained in:
parent
6693efeb3b
commit
011df4a9a1
|
@ -1,9 +1,9 @@
|
|||
import SystemFonts from 'system-font-families'
|
||||
|
||||
const fonts = () => {
|
||||
const fonts = async (): Promise<Array<string>> => {
|
||||
const systemFonts = new SystemFonts()
|
||||
return systemFonts.getFonts()
|
||||
.then(res => {
|
||||
.then((res: string) => {
|
||||
return Array.from(new Set(res)).sort()
|
||||
})
|
||||
}
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue