File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -163,26 +163,22 @@ namespace ts.server {
163163 * Scheduling is done via instance of NextStep. If on current step subsequent step was not scheduled - operation is assumed to be completed.
164164 */
165165 class MultistepOperation implements NextStep {
166- private requestId : number ;
166+ private requestId : number | undefined ;
167167 private timerHandle : any ;
168- private immediateId : any ;
169- private completed = true ;
168+ private immediateId : number | undefined ;
170169
171170 constructor ( private readonly operationHost : MultistepOperationHost ) { }
172171
173172 public startNew ( action : ( next : NextStep ) => void ) {
174173 this . complete ( ) ;
175174 this . requestId = this . operationHost . getCurrentRequestId ( ) ;
176- this . completed = false ;
177175 this . executeAction ( action ) ;
178176 }
179177
180178 private complete ( ) {
181- if ( ! this . completed ) {
182- if ( this . requestId ) {
183- this . operationHost . sendRequestCompletedEvent ( this . requestId ) ;
184- }
185- this . completed = true ;
179+ if ( this . requestId !== undefined ) {
180+ this . operationHost . sendRequestCompletedEvent ( this . requestId ) ;
181+ this . requestId = undefined ;
186182 }
187183 this . setTimerHandle ( undefined ) ;
188184 this . setImmediateId ( undefined ) ;
You can’t perform that action at this time.
0 commit comments