( request: Request, task: Task, allowLazy: boolean, )
| 2082 | } |
| 2083 | |
| 2084 | function outlineHaltedTask( |
| 2085 | request: Request, |
| 2086 | task: Task, |
| 2087 | allowLazy: boolean, |
| 2088 | ): ReactJSONValue { |
| 2089 | // In the future if we track task state for resuming we'll maybe need to |
| 2090 | // construnct an actual task here but since we're never going to retry it |
| 2091 | // we just claim the id and serialize it according to the proper convention |
| 2092 | const taskId = request.nextChunkId++; |
| 2093 | if (allowLazy) { |
| 2094 | // We're halting in a position that can handle a lazy reference |
| 2095 | return serializeLazyID(taskId); |
| 2096 | } else { |
| 2097 | // We're halting in a position that needs a value reference |
| 2098 | return serializeByValueID(taskId); |
| 2099 | } |
| 2100 | } |
| 2101 | |
| 2102 | function renderElement( |
| 2103 | request: Request, |
no test coverage detected