@@ -614,15 +614,15 @@ export class RunOnceScheduler {
614614
615615 protected runner : ( ( ...args : any [ ] ) => void ) | null ;
616616
617- private _timeoutToken : any ;
618- private _timeout : number ;
619- private _timeoutHandler : ( ) => void ;
617+ private timeoutToken : any ;
618+ private timeout : number ;
619+ private timeoutHandler : ( ) => void ;
620620
621- constructor ( runner : ( ...args : any [ ] ) => void , timeout : number ) {
622- this . _timeoutToken = - 1 ;
621+ constructor ( runner : ( ...args : any [ ] ) => void , delay : number ) {
622+ this . timeoutToken = - 1 ;
623623 this . runner = runner ;
624- this . _timeout = timeout ;
625- this . _timeoutHandler = this . onTimeout . bind ( this ) ;
624+ this . timeout = delay ;
625+ this . timeoutHandler = this . onTimeout . bind ( this ) ;
626626 }
627627
628628 /**
@@ -638,36 +638,36 @@ export class RunOnceScheduler {
638638 */
639639 cancel ( ) : void {
640640 if ( this . isScheduled ( ) ) {
641- clearTimeout ( this . _timeoutToken ) ;
642- this . _timeoutToken = - 1 ;
641+ clearTimeout ( this . timeoutToken ) ;
642+ this . timeoutToken = - 1 ;
643643 }
644644 }
645645
646646 /**
647647 * Cancel previous runner (if any) & schedule a new runner.
648648 */
649- schedule ( delay = this . _timeout ) : void {
649+ schedule ( delay = this . timeout ) : void {
650650 this . cancel ( ) ;
651- this . _timeoutToken = setTimeout ( this . _timeoutHandler , delay ) ;
651+ this . timeoutToken = setTimeout ( this . timeoutHandler , delay ) ;
652652 }
653653
654- get timeout ( ) : number {
655- return this . _timeout ;
654+ get delay ( ) : number {
655+ return this . timeout ;
656656 }
657657
658- set timeout ( value : number ) {
659- this . _timeout = value ;
658+ set delay ( value : number ) {
659+ this . timeout = value ;
660660 }
661661
662662 /**
663663 * Returns true if scheduled.
664664 */
665665 isScheduled ( ) : boolean {
666- return this . _timeoutToken !== - 1 ;
666+ return this . timeoutToken !== - 1 ;
667667 }
668668
669669 private onTimeout ( ) {
670- this . _timeoutToken = - 1 ;
670+ this . timeoutToken = - 1 ;
671671 if ( this . runner ) {
672672 this . doRun ( ) ;
673673 }
0 commit comments