@@ -30,6 +30,7 @@ export interface TscWatchCompileChange<T extends ts.BuilderProgram = ts.EmitAndS
3030export interface TscWatchCheckOptions {
3131 baselineSourceMap ?: boolean ;
3232 baselineDependencies ?: boolean ;
33+ skipIncrementalVerification ?: true ;
3334}
3435export interface TscWatchCompileBase < T extends ts . BuilderProgram = ts . EmitAndSemanticDiagnosticsBuilderProgram > extends TscWatchCheckOptions {
3536 scenario : string ;
@@ -57,6 +58,7 @@ function tscWatchCompile(input: TscWatchCompile) {
5758 edits,
5859 baselineSourceMap,
5960 baselineDependencies,
61+ skipIncrementalVerification,
6062 } = input ;
6163 ts . Debug . assert ( isWatch ( commandLineArgs ) , "use verifyTsc" ) ;
6264 const { cb, getPrograms } = commandLineCallbacks ( sys ) ;
@@ -74,6 +76,7 @@ function tscWatchCompile(input: TscWatchCompile) {
7476 getPrograms,
7577 baselineSourceMap,
7678 baselineDependencies,
79+ skipIncrementalVerification,
7780 edits,
7881 watchOrSolution,
7982 } ) ;
@@ -143,6 +146,7 @@ export function runWatchBaseline<T extends ts.BuilderProgram = ts.EmitAndSemanti
143146 baseline,
144147 baselineSourceMap,
145148 baselineDependencies,
149+ skipIncrementalVerification,
146150 edits,
147151 watchOrSolution,
148152 useSourceOfProjectReferenceRedirect,
@@ -155,6 +159,7 @@ export function runWatchBaseline<T extends ts.BuilderProgram = ts.EmitAndSemanti
155159 sys,
156160 baselineSourceMap,
157161 baselineDependencies,
162+ skipIncrementalVerification,
158163 } ) ;
159164
160165 if ( edits ) {
@@ -168,6 +173,7 @@ export function runWatchBaseline<T extends ts.BuilderProgram = ts.EmitAndSemanti
168173 sys,
169174 baselineSourceMap,
170175 baselineDependencies,
176+ skipIncrementalVerification,
171177 caption,
172178 resolutionCache : ( watchOrSolution as ts . WatchOfConfigFile < T > | undefined ) ?. getResolutionCache ?.( ) ,
173179 useSourceOfProjectReferenceRedirect,
@@ -191,6 +197,7 @@ export function watchBaseline({
191197 sys,
192198 baselineSourceMap,
193199 baselineDependencies,
200+ skipIncrementalVerification,
194201 caption,
195202 resolutionCache,
196203 useSourceOfProjectReferenceRedirect,
@@ -205,7 +212,7 @@ export function watchBaseline({
205212 baselineDependencies ,
206213 ) ;
207214 // Verify program structure and resolution cache when incremental edit with tsc --watch (without build mode)
208- if ( resolutionCache && programs . length ) {
215+ if ( ! skipIncrementalVerification && resolutionCache && programs . length ) {
209216 ts . Debug . assert ( programs . length === 1 ) ;
210217 verifyProgramStructureAndResolutionCache (
211218 caption ! ,
0 commit comments