( thenableState: ThenableState, index: number, )
| 132 | } |
| 133 | |
| 134 | export function readPreviousThenable<T>( |
| 135 | thenableState: ThenableState, |
| 136 | index: number, |
| 137 | ): void | T { |
| 138 | const previous = thenableState[index]; |
| 139 | if (previous === undefined) { |
| 140 | return undefined; |
| 141 | } else { |
| 142 | // We assume this has been resolved already. |
| 143 | return (previous: any).value; |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | // This is used to track the actual thenable that suspended so it can be |
| 148 | // passed to the rest of the Suspense implementation — which, for historical |
no outgoing calls
no test coverage detected