Block WebAPI during active registration

This commit is contained in:
Fedor Indutny 2021-12-17 22:26:50 +01:00 committed by GitHub
parent 9e9e5274cf
commit 8070b8b14f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 100 additions and 35 deletions

View file

@ -1,11 +1,13 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
export function explodePromise<T>(): {
export type ExplodePromiseResultType<T> = Readonly<{
promise: Promise<T>;
resolve: (value: T) => void;
reject: (error: Error) => void;
} {
}>;
export function explodePromise<T>(): ExplodePromiseResultType<T> {
let resolve: (value: T) => void;
let reject: (error: Error) => void;