2024-06-22 22:29:13 +09:00
|
|
|
/*
|
|
|
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/** rejectに型付けができるPromise */
|
2024-06-23 02:35:49 +09:00
|
|
|
export class ErrPromise<TSuccess, TError> extends Promise<TSuccess> {
|
2024-06-22 22:29:13 +09:00
|
|
|
constructor(executor: (resolve: (value: TSuccess | PromiseLike<TSuccess>) => void, reject: (reason: TError) => void) => void) {
|
|
|
|
|
super(executor);
|
|
|
|
|
}
|
|
|
|
|
}
|