UNPKG

907 BJavaScriptView Raw
1/**
2 * This class is used to pass all required contextual information to the runInFiber()
3 * function as a single argument. runInFiber() can only accept a single argument because
4 * it is invoked via Fiber#run(), which can only pass through a single argument.
5 */
6var RunContext = (function () {
7 /** Construct a new RunContext instance. */
8 function RunContext(wrapped, thisArg, argsAsArray, done) {
9 /** Optional promise resolver for notifying the wrapped function's return/throw value. */
10 this.resolver = null;
11 /** Optional callback for notifying the wrapped function's return/throw value. */
12 this.callback = null;
13 this.wrapped = wrapped;
14 this.thisArg = thisArg;
15 this.argsAsArray = argsAsArray;
16 this.done = done;
17 }
18 return RunContext;
19})();
20module.exports = RunContext;
21//# sourceMappingURL=runContext.js.map
\No newline at end of file