MCPcopy Create free account
hub / github.com/caseywebdev/react-list / chainThenableValue

Function chainThenableValue

docs/index.js:7101–7125  ·  view source on GitHub ↗
(thenable, result)

Source from the content-addressed store, hash-verified

7099 }
7100}
7101function chainThenableValue(thenable, result) {
7102 var listeners = [],
7103 thenableWithOverride = {
7104 status: "pending",
7105 value: null,
7106 reason: null,
7107 then: function (resolve) {
7108 listeners.push(resolve);
7109 }
7110 };
7111 thenable.then(
7112 function () {
7113 thenableWithOverride.status = "fulfilled";
7114 thenableWithOverride.value = result;
7115 for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result);
7116 },
7117 function (error) {
7118 thenableWithOverride.status = "rejected";
7119 thenableWithOverride.reason = error;
7120 for (error = 0; error < listeners.length; error++)
7121 (0, listeners[error])(void 0);
7122 }
7123 );
7124 return thenableWithOverride;
7125}
7126var prevOnStartTransitionFinish = ReactSharedInternals.S;
7127ReactSharedInternals.S = function (transition, returnValue) {
7128 "object" === typeof returnValue &&

Callers 1

startTransitionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…