Fix a missing void type argument to Promise

This commit is contained in:
noradichter 2022-03-16 10:01:21 -07:00
parent 3024c5b2fc
commit fa9253e87a

View file

@ -275,7 +275,7 @@ class HavenoDaemon {
*/
async createAccount(password: string): Promise<void> {
let that = this;
await new Promise(function(resolve, reject) {
await new Promise<void>(function(resolve, reject) {
that._accountClient.createAccount(new CreateAccountRequest().setPassword(password), {password: that._password}, function(err: grpcWeb.RpcError) {
if (err) reject(err);
else resolve();
@ -291,7 +291,7 @@ class HavenoDaemon {
*/
async openAccount(password: string): Promise<void> {
let that = this;
await new Promise(function(resolve, reject) {
await new Promise<void>(function(resolve, reject) {
that._accountClient.openAccount(new OpenAccountRequest().setPassword(password), {password: that._password}, function(err: grpcWeb.RpcError) {
if (err) reject(err);
else resolve();
@ -1158,7 +1158,7 @@ class HavenoDaemon {
async shutdownServer() {
if (this._keepAliveLooper) this._keepAliveLooper.stop();
let that = this;
await new Promise(function(resolve, reject) {
await new Promise<void>(function(resolve, reject) {
that._shutdownServerClient.stop(new StopRequest(), {password: that._password}, function(err: grpcWeb.RpcError) { // process receives 'exit' event
if (err) reject(err);
else resolve();