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>(
254254 } ;
255255
256256 function addTypeAnnotation ( span : TextSpan ) {
257+ context . cancellationToken . throwIfCancellationRequested ( ) ;
258+
257259 const nodeWithDiag = getTokenAtPosition ( sourceFile , span . start ) ;
258260
259261 const expandoFunction = findExpandoFunction ( nodeWithDiag ) ;
@@ -331,6 +333,8 @@ function withContext<T>(
331333 }
332334
333335 function addInlineAssertion ( span : TextSpan ) : DiagnosticOrDiagnosticAndArguments | undefined {
336+ context . cancellationToken . throwIfCancellationRequested ( ) ;
337+
334338 const nodeWithDiag = getTokenAtPosition ( sourceFile , span . start ) ;
335339 const expandoFunction = findExpandoFunction ( nodeWithDiag ) ;
336340 // No inline assertions for expando members
@@ -406,6 +410,8 @@ function withContext<T>(
406410 }
407411
408412 function extractAsVariable ( span : TextSpan ) : DiagnosticOrDiagnosticAndArguments | undefined {
413+ context . cancellationToken . throwIfCancellationRequested ( ) ;
414+
409415 const nodeWithDiag = getTokenAtPosition ( sourceFile , span . start ) ;
410416 const targetNode = findBestFittingNode ( nodeWithDiag , span ) as Expression ;
411417 if ( ! targetNode || isValueSignatureDeclaration ( targetNode ) || isValueSignatureDeclaration ( targetNode . parent ) ) return ;
You can’t perform that action at this time.
0 commit comments