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