MCPcopy
hub / github.com/facebook/react / resolve

Function resolve

packages/react-reconciler/src/__tests__/ReactTransition-test.js:70–84  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

68 version,
69 data,
70 resolve(text) {
71 const record = data.get(text);
72 if (record === undefined) {
73 const newRecord = {
74 status: 'resolved',
75 value: text,
76 };
77 data.set(text, newRecord);
78 } else if (record.status === 'pending') {
79 const thenable = record.value;
80 record.status = 'resolved';
81 record.value = text;
82 thenable.pings.forEach(t => t());
83 }
84 },
85 reject(text, error) {
86 const record = data.get(text);
87 if (record === undefined) {

Callers 15

fakeCacheReadFunction · 0.70
resolveTextFunction · 0.70
thenFunction · 0.70
thenFunction · 0.70
resolveTextRequestsFunction · 0.70
thenFunction · 0.70
thenFunction · 0.70
thenFunction · 0.70
thenFunction · 0.70
thenFunction · 0.70

Calls 4

setMethod · 0.80
getMethod · 0.65
forEachMethod · 0.65
tFunction · 0.50

Tested by

no test coverage detected