File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -254,6 +254,8 @@ function withContext<T>(
254
254
} ;
255
255
256
256
function addTypeAnnotation ( span : TextSpan ) {
257
+ context . cancellationToken . throwIfCancellationRequested ( ) ;
258
+
257
259
const nodeWithDiag = getTokenAtPosition ( sourceFile , span . start ) ;
258
260
259
261
const expandoFunction = findExpandoFunction ( nodeWithDiag ) ;
@@ -331,6 +333,8 @@ function withContext<T>(
331
333
}
332
334
333
335
function addInlineAssertion ( span : TextSpan ) : DiagnosticOrDiagnosticAndArguments | undefined {
336
+ context . cancellationToken . throwIfCancellationRequested ( ) ;
337
+
334
338
const nodeWithDiag = getTokenAtPosition ( sourceFile , span . start ) ;
335
339
const expandoFunction = findExpandoFunction ( nodeWithDiag ) ;
336
340
// No inline assertions for expando members
@@ -406,6 +410,8 @@ function withContext<T>(
406
410
}
407
411
408
412
function extractAsVariable ( span : TextSpan ) : DiagnosticOrDiagnosticAndArguments | undefined {
413
+ context . cancellationToken . throwIfCancellationRequested ( ) ;
414
+
409
415
const nodeWithDiag = getTokenAtPosition ( sourceFile , span . start ) ;
410
416
const targetNode = findBestFittingNode ( nodeWithDiag , span ) as Expression ;
411
417
if ( ! targetNode || isValueSignatureDeclaration ( targetNode ) || isValueSignatureDeclaration ( targetNode . parent ) ) return ;
You can’t perform that action at this time.
0 commit comments