17 ReactIOInfo,
18 ReactStackTrace,
19▶ ReactFunctionLocation,
20 ReactErrorInfoDev,
21} from 'shared/ReactTypes';
· · ·
267
268// $FlowFixMe[missing-this-annot]
269▶function ReactPromise(status: any, value: any, reason: any) {
270 this.status = status;
271 this.value = value;
· · ·
282ReactPromise.prototype = Object.create(Promise.prototype) as any;
283// TODO: This doesn't return a new Promise chain unlike the real .then
284▶function reactPromiseThen<T>(
285 this: SomeChunk<T>,
286 resolve: (value: T) => mixed,
· · ·
322 switch (chunk.status) {
323 case INITIALIZED:
324▶ if (typeof resolve === 'function') {
325 resolve(chunk.value);
326 }
· · ·
329 case PENDING_WEAK:
330 case BLOCKED:
331▶ if (typeof resolve === 'function') {
332 if (chunk.value === null) {
333 chunk.value = [] as Array<InitializationReference | (T => mixed)>;
+ 199 more matches in this file