normalizeIOInfo() — react Function Reference
Architecture documentation for the normalizeIOInfo() function in debugInfo.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 58be0028_746e_ad50_4976_f091aa791dab["normalizeIOInfo()"] 46a94f52_c44a_45bb_dd31_eb8109978851["debugInfo.js"] 58be0028_746e_ad50_4976_f091aa791dab -->|defined in| 46a94f52_c44a_45bb_dd31_eb8109978851 4bfbffb0_89fc_0242_664a_966e634a6a47["normalizeDebugInfo()"] 4bfbffb0_89fc_0242_664a_966e634a6a47 -->|calls| 58be0028_746e_ad50_4976_f091aa791dab baf09f87_d020_a596_f252_273eafc905ae["formatV8Stack()"] 58be0028_746e_ad50_4976_f091aa791dab -->|calls| baf09f87_d020_a596_f252_273eafc905ae 88cd6d4c_263c_1e63_ca3a_d9c352f8403b["normalizeStack()"] 58be0028_746e_ad50_4976_f091aa791dab -->|calls| 88cd6d4c_263c_1e63_ca3a_d9c352f8403b 4bfbffb0_89fc_0242_664a_966e634a6a47["normalizeDebugInfo()"] 58be0028_746e_ad50_4976_f091aa791dab -->|calls| 4bfbffb0_89fc_0242_664a_966e634a6a47 style 58be0028_746e_ad50_4976_f091aa791dab fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/internal-test-utils/debugInfo.js lines 43–96
function normalizeIOInfo(config: DebugInfoConfig, ioInfo) {
const {debugTask, debugStack, debugLocation, ...copy} = ioInfo;
if (ioInfo.stack) {
copy.stack = config.useV8Stack
? formatV8Stack(ioInfo.stack)
: normalizeStack(ioInfo.stack);
}
if (ioInfo.owner) {
copy.owner = normalizeDebugInfo(config, ioInfo.owner);
}
if (typeof ioInfo.start === 'number' && config.useFixedTime) {
copy.start = 0;
}
if (typeof ioInfo.end === 'number' && config.useFixedTime) {
copy.end = 0;
}
const promise = ioInfo.value;
if (promise) {
promise.then(); // init
if (promise.status === 'fulfilled') {
if (ioInfo.name === 'rsc stream') {
copy.byteSize = 0;
copy.value = {
value: 'stream',
};
} else {
copy.value = {
value: promise.value,
};
}
} else if (promise.status === 'rejected') {
copy.value = {
reason: promise.reason,
};
} else {
copy.value = {
status: promise.status,
};
}
} else if ('value' in ioInfo) {
// If value exists in ioInfo but is undefined (e.g., WeakRef was GC'd),
// ensure we still include it in the normalized output for consistency
copy.value = {
value: undefined,
};
} else if (ioInfo.name && ioInfo.name !== 'rsc stream') {
// For non-rsc-stream IO that doesn't have a value field, add a default.
// This handles the case where the server doesn't send the field when WeakRef is GC'd.
copy.value = {
value: undefined,
};
}
return copy;
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does normalizeIOInfo() do?
normalizeIOInfo() is a function in the react codebase, defined in packages/internal-test-utils/debugInfo.js.
Where is normalizeIOInfo() defined?
normalizeIOInfo() is defined in packages/internal-test-utils/debugInfo.js at line 43.
What does normalizeIOInfo() call?
normalizeIOInfo() calls 3 function(s): formatV8Stack, normalizeDebugInfo, normalizeStack.
What calls normalizeIOInfo()?
normalizeIOInfo() is called by 1 function(s): normalizeDebugInfo.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free