subscribeTsc() — react Function Reference
Architecture documentation for the subscribeTsc() function in runner-watch.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 3e4a24c5_3237_0f3f_ad07_853134dd7327["subscribeTsc()"] 3c2dde8c_5e90_a277_13bd_39083b18cadb["runner-watch.ts"] 3e4a24c5_3237_0f3f_ad07_853134dd7327 -->|defined in| 3c2dde8c_5e90_a277_13bd_39083b18cadb 7865a05e_4feb_a8ba_40fe_4675700de39b["makeWatchRunner()"] 7865a05e_4feb_a8ba_40fe_4675700de39b -->|calls| 3e4a24c5_3237_0f3f_ad07_853134dd7327 162e6a49_36d0_cdf1_de46_a40230bcfbc6["watchSrc()"] 3e4a24c5_3237_0f3f_ad07_853134dd7327 -->|calls| 162e6a49_36d0_cdf1_de46_a40230bcfbc6 style 3e4a24c5_3237_0f3f_ad07_853134dd7327 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/snap/src/runner-watch.ts lines 155–186
function subscribeTsc(
state: RunnerState,
onChange: (state: RunnerState) => void,
) {
// Run TS in incremental watch mode
watchSrc(
function onStart() {
// Notify the user when compilation starts but don't clear the screen yet
console.log('\nCompiling...');
},
isTypecheckSuccess => {
let isCompilerBuildValid = false;
if (isTypecheckSuccess) {
try {
execSync('yarn build', {cwd: BABEL_PLUGIN_ROOT});
console.log('Built compiler successfully with tsup');
isCompilerBuildValid = true;
} catch (e) {
console.warn('Failed to build compiler with tsup:', e);
}
}
// Bump the compiler version after a build finishes
// and re-run tests
if (isCompilerBuildValid) {
state.compilerVersion++;
}
state.isCompilerBuildValid = isCompilerBuildValid;
state.mode.action = RunnerAction.Test;
onChange(state);
},
);
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does subscribeTsc() do?
subscribeTsc() is a function in the react codebase, defined in compiler/packages/snap/src/runner-watch.ts.
Where is subscribeTsc() defined?
subscribeTsc() is defined in compiler/packages/snap/src/runner-watch.ts at line 155.
What does subscribeTsc() call?
subscribeTsc() calls 1 function(s): watchSrc.
What calls subscribeTsc()?
subscribeTsc() is called by 1 function(s): makeWatchRunner.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free