From ef1872dc025a4b29481cdcf0b84b7f7af34e99b4 Mon Sep 17 00:00:00 2001
From: pacien <pacien.trangirard@pacien.net>
Date: Fri, 7 Jun 2019 15:54:54 +0200
Subject: [PATCH] disambiguate promise type

fixing compilation with Typescript 3.5.1

github: closes #487

Signed-off-by: pacien <pacien.trangirard@pacien.net>
---
 src/bot.ts   | 2 +-
 src/store.ts | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bot.ts b/src/bot.ts
index 2c7ec05..d88c10b 100644
--- a/src/bot.ts
+++ b/src/bot.ts
@@ -145,7 +145,7 @@ export class DiscordBot {
         }
 
         this.channelLocks[channel.id] = {i: null, r: null, p: null};
-        const p = new Promise((resolve) => {
+        const p = new Promise<{}>((resolve) => {
             const i = setTimeout(() => {
                 log.warn(`Lock on channel ${channel.id} expired. Discord is lagging behind?`);
                 this.unlockChannel(channel);
diff --git a/src/store.ts b/src/store.ts
index db1b9f0..31764b2 100644
--- a/src/store.ts
+++ b/src/store.ts
@@ -72,7 +72,7 @@ export class DiscordStore {
                 return resolve(err === null);
             });
         }).then(async (result) => {
-            return new Promise((resolve, reject) => {
+            return new Promise<void|{}>((resolve, reject) => {
                 if (!result) {
                     log.warn("NOT backing up database while a file already exists");
                     resolve(true);
-- 
GitLab