Types src/content

This commit is contained in:
Shin'ya Ueoka 2019-05-02 14:08:51 +09:00
parent 992b3ac65d
commit d01db82c0d
62 changed files with 1411 additions and 468 deletions
src/background/presenters

View file

@ -1,11 +1,11 @@
const NOTIFICATION_ID = 'vimvixen-update';
export default class NotifyPresenter {
notify(
async notify(
title: string,
message: string,
onclick: () => void,
): Promise<string> {
): Promise<void> {
const listener = (id: string) => {
if (id !== NOTIFICATION_ID) {
return;
@ -17,7 +17,7 @@ export default class NotifyPresenter {
};
browser.notifications.onClicked.addListener(listener);
return browser.notifications.create(NOTIFICATION_ID, {
await browser.notifications.create(NOTIFICATION_ID, {
'type': 'basic',
'iconUrl': browser.extension.getURL('resources/icon_48x48.png'),
title,