@@ -14,6 +14,11 @@ const {
1414 Immediate,
1515 insert
1616} = require ( 'internal/timers' ) ;
17+ const {
18+ clearImmediate,
19+ clearInterval,
20+ clearTimeout,
21+ } = require ( 'timers' ) ;
1722
1823const {
1924 AbortError,
@@ -73,7 +78,6 @@ function setTimeout(after, value, options = {}) {
7378 insert ( timeout , timeout . _idleTimeout ) ;
7479 if ( signal ) {
7580 oncancel = FunctionPrototypeBind ( cancelListenerHandler ,
76- // eslint-disable-next-line no-undef
7781 timeout , clearTimeout , reject ) ;
7882 signal . addEventListener ( 'abort' , oncancel ) ;
7983 }
@@ -117,7 +121,6 @@ function setImmediate(value, options = {}) {
117121 if ( ! ref ) immediate . unref ( ) ;
118122 if ( signal ) {
119123 oncancel = FunctionPrototypeBind ( cancelListenerHandler ,
120- // eslint-disable-next-line no-undef
121124 immediate , clearImmediate , reject ) ;
122125 signal . addEventListener ( 'abort' , oncancel ) ;
123126 }
@@ -152,7 +155,6 @@ async function* setInterval(after, value, options = {}) {
152155 insert ( interval , interval . _idleTimeout ) ;
153156 if ( signal ) {
154157 onCancel = ( ) => {
155- // eslint-disable-next-line no-undef
156158 clearInterval ( interval ) ;
157159 if ( callback ) {
158160 callback ( PromiseReject ( new AbortError ( ) ) ) ;
@@ -172,7 +174,6 @@ async function* setInterval(after, value, options = {}) {
172174 }
173175 throw new AbortError ( ) ;
174176 } finally {
175- // eslint-disable-next-line no-undef
176177 clearInterval ( interval ) ;
177178 signal ?. removeEventListener ( 'abort' , onCancel ) ;
178179 }
0 commit comments