mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor: remove unused promise completer (#5522)
* The PromiseCompleter is not used anywhere and in reality everbody can implement such a thing on his own. Also since there is the best practice to resolve/reject the promise while being inside of the anonymous function.
This commit is contained in:
committed by
mmalerba
parent
48e4e926a6
commit
8817b4da8d
@@ -1,21 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
/** @docs-private */
|
||||
export class PromiseCompleter<R> {
|
||||
promise: Promise<R>;
|
||||
resolve: (value?: R | PromiseLike<R>) => void;
|
||||
reject: (error?: any, stackTrace?: string) => void;
|
||||
|
||||
constructor() {
|
||||
this.promise = new Promise((res, rej) => {
|
||||
this.resolve = res;
|
||||
this.reject = rej;
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user