()
| 149 | // reasons, expects to receive a thenable. |
| 150 | let suspendedThenable: Thenable<any> | null = null; |
| 151 | export function getSuspendedThenable(): Thenable<mixed> { |
| 152 | // This is called right after `use` suspends by throwing an exception. `use` |
| 153 | // throws an opaque value instead of the thenable itself so that it can't be |
| 154 | // caught in userspace. Then the work loop accesses the actual thenable using |
| 155 | // this function. |
| 156 | if (suspendedThenable === null) { |
| 157 | throw new Error( |
| 158 | 'Expected a suspended thenable. This is a bug in React. Please file ' + |
| 159 | 'an issue.', |
| 160 | ); |
| 161 | } |
| 162 | const thenable = suspendedThenable; |
| 163 | suspendedThenable = null; |
| 164 | return thenable; |
| 165 | } |
no outgoing calls
no test coverage detected