MCPcopy
hub / github.com/facebook/react / emitTimeOriginChunk

Function emitTimeOriginChunk

packages/react-server/src/ReactFlightServer.js:5232–5241  ·  view source on GitHub ↗
(request: Request, timeOrigin: number)

Source from the content-addressed store, hash-verified

5230}
5231
5232function emitTimeOriginChunk(request: Request, timeOrigin: number): void {
5233 // We emit the time origin once. All ReactTimeInfo timestamps later in the stream
5234 // are relative to this time origin. This allows for more compact number encoding
5235 // and lower precision loss.
5236 request.pendingDebugChunks++;
5237 const row = ':N' + timeOrigin + '\n';
5238 const processedChunk = stringToChunk(row);
5239 // TODO: Move to its own priority queue.
5240 request.completedDebugChunks.push(processedChunk);
5241}
5242
5243function forwardDebugInfo(
5244 request: Request,

Callers 1

RequestInstanceFunction · 0.85

Calls 2

stringToChunkFunction · 0.90
pushMethod · 0.65

Tested by

no test coverage detected