Skip to content

Commit

Permalink
refactor: change react promise status type
Browse files Browse the repository at this point in the history
  • Loading branch information
ifabriciorodrigues committed Nov 24, 2024
1 parent 2a9f4c0 commit 0847985
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/react-client/src/ReactFlightClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@ const RESOLVED_MODULE = 'resolved_module';
const INITIALIZED = 'fulfilled';
const ERRORED = 'rejected';

type ReactPromiseStatus =
| typeof PENDING
| typeof BLOCKED
| typeof RESOLVED_MODEL
| typeof RESOLVED_MODULE
| typeof INITIALIZED
| typeof ERRORED;

type PendingChunk<T> = {
status: 'pending',
value: null | Array<(T) => mixed>,
Expand Down Expand Up @@ -203,7 +211,7 @@ type SomeChunk<T> =

// $FlowFixMe[missing-this-annot]
function ReactPromise(
status: any,
status: ReactPromiseStatus,
value: any,
reason: any,
response: Response,
Expand Down

0 comments on commit 0847985

Please sign in to comment.