Skip to content

Commit d0d76b6

Browse files
committed
Assign closure type explicitly
1 parent 9a00aac commit d0d76b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/library_promise.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ mergeInto(LibraryManager.library, {
201201
} else {
202202
var reject = {{{ cDefs.EM_PROMISE_REJECT }}};
203203
{{{ makeSetValue('resultBuf', 'resultOffset', 'reject', 'i32') }}};
204-
// Closure can't type `reason` in some contexts
205-
/** @suppress {checkTypes} */
206-
{{{ makeSetValue('resultBuf', 'valueOffset', 'results[i].reason', '*') }}};
204+
// Closure can't type `reason` in some contexts.
205+
var reason = /** @type {number} */ (results[i].reason);
206+
{{{ makeSetValue('resultBuf', 'valueOffset', 'reason', '*') }}};
207207
}
208208
}
209209
}

0 commit comments

Comments
 (0)