File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -531,7 +531,8 @@ namespace ts.refactor.extractMethod {
531
531
scopes ,
532
532
enclosingTextRange ,
533
533
sourceFile ,
534
- context . program . getTypeChecker ( ) ) ;
534
+ context . program . getTypeChecker ( ) ,
535
+ context . cancellationToken ) ;
535
536
536
537
context . cancellationToken . throwIfCancellationRequested ( ) ;
537
538
@@ -932,7 +933,8 @@ namespace ts.refactor.extractMethod {
932
933
scopes : Scope [ ] ,
933
934
enclosingTextRange : TextRange ,
934
935
sourceFile : SourceFile ,
935
- checker : TypeChecker ) {
936
+ checker : TypeChecker ,
937
+ cancellationToken : CancellationToken ) {
936
938
937
939
const allTypeParameterUsages = createMap < TypeParameter > ( ) ; // Key is type ID
938
940
const usagesPerScope : ScopeUsages [ ] = [ ] ;
@@ -1045,7 +1047,7 @@ namespace ts.refactor.extractMethod {
1045
1047
// PERF: This is potentially very expensive. `type` could be a library type with
1046
1048
// a lot of properties, each of which the walker will visit. Unfortunately, the
1047
1049
// solution isn't as trivial as filtering to user types because of (e.g.) Array.
1048
- const symbolWalker = checker . getSymbolWalker ( ) ;
1050
+ const symbolWalker = checker . getSymbolWalker ( ( ) => ( cancellationToken . throwIfCancellationRequested ( ) , true ) ) ;
1049
1051
const { visitedTypes} = symbolWalker . walkType ( type ) ;
1050
1052
1051
1053
for ( const visitedType of visitedTypes ) {
You can’t perform that action at this time.
0 commit comments