MCPcopy Index your code
hub / github.com/facebook/react / wake

Function wake

packages/react-devtools-shared/src/hookNamesCache.js:110–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

108 let resolvedHookNames: HookNames | null = null;
109
110 const wake = () => {
111 if (timeoutID) {
112 clearTimeout(timeoutID);
113 timeoutID = null;
114 }
115
116 // This assumes they won't throw.
117 callbacks.forEach(callback => callback((thenable: any).value));
118 callbacks.clear();
119 rejectCallbacks.clear();
120 };
121 const wakeRejections = () => {
122 if (timeoutID) {
123 clearTimeout(timeoutID);

Callers 1

loadHookNamesFunction · 0.70

Calls 3

forEachMethod · 0.65
callbackFunction · 0.50
clearMethod · 0.45

Tested by

no test coverage detected