@@ -178,7 +178,7 @@ export class Delayer<T> implements IDisposable {
178178 private timeout : any ;
179179 private completionPromise : Promise < any > | null ;
180180 private doResolve : ( ( value ?: any | Promise < any > ) => void ) | null ;
181- private doReject : ( err : any ) => void ;
181+ private doReject ? : ( err : any ) => void ;
182182 private task : ITask < T | Promise < T > > | null ;
183183
184184 constructor ( public defaultDelay : number ) {
@@ -222,7 +222,7 @@ export class Delayer<T> implements IDisposable {
222222 this . cancelTimeout ( ) ;
223223
224224 if ( this . completionPromise ) {
225- this . doReject ( errors . canceled ( ) ) ;
225+ this . doReject ! ( errors . canceled ( ) ) ;
226226 this . completionPromise = null ;
227227 }
228228 }
@@ -282,7 +282,7 @@ export class Barrier {
282282
283283 private _isOpen : boolean ;
284284 private _promise : Promise < boolean > ;
285- private _completePromise : ( v : boolean ) => void ;
285+ private _completePromise ! : ( v : boolean ) => void ;
286286
287287 constructor ( ) {
288288 this . _isOpen = false ;
@@ -731,8 +731,8 @@ export class IdleValue<T> {
731731 private readonly _executor : ( ) => void ;
732732 private readonly _handle : IDisposable ;
733733
734- private _didRun : boolean ;
735- private _value : T ;
734+ private _didRun : boolean = false ;
735+ private _value ? : T ;
736736 private _error : any ;
737737
738738 constructor ( executor : ( ) => T ) {
@@ -760,7 +760,7 @@ export class IdleValue<T> {
760760 if ( this . _error ) {
761761 throw this . _error ;
762762 }
763- return this . _value ;
763+ return this . _value ! ;
764764 }
765765}
766766
0 commit comments