Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: ui/webui/resources/js/promise_resolver.js

Issue 1755423003: Re-use PromiseResolver helper in print preview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@reject_promise
Patch Set: Add @struct Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/print_preview/search/provisional_destination_resolver.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/promise_resolver.js
diff --git a/ui/webui/resources/js/promise_resolver.js b/ui/webui/resources/js/promise_resolver.js
index e4fedaa5d8c27cff278ccbd3804a7693aecce134..0759c955584cc18ca2808ea9ad6bd4c64f2fa49c 100644
--- a/ui/webui/resources/js/promise_resolver.js
+++ b/ui/webui/resources/js/promise_resolver.js
@@ -16,15 +16,18 @@
* resolver.resolve({hello: 'world'});
*/
-/** @constructor */
+/**
+ * @constructor @struct
+ * @template T
+ */
function PromiseResolver() {
- /** @type {!Function} */
+ /** @type {function(T): void} */
this.resolve;
- /** @type {!Function} */
+ /** @type {function(*=): void} */
this.reject;
- /** @type {!Promise} */
+ /** @type {!Promise<T>} */
this.promise = new Promise(function(resolve, reject) {
this.resolve = resolve;
this.reject = reject;
« no previous file with comments | « chrome/browser/resources/print_preview/search/provisional_destination_resolver.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698