@@ -14,6 +14,11 @@ const {
14
14
Immediate,
15
15
insert
16
16
} = require ( 'internal/timers' ) ;
17
+ const {
18
+ clearImmediate,
19
+ clearInterval,
20
+ clearTimeout,
21
+ } = require ( 'timers' ) ;
17
22
18
23
const {
19
24
AbortError,
@@ -73,7 +78,6 @@ function setTimeout(after, value, options = {}) {
73
78
insert ( timeout , timeout . _idleTimeout ) ;
74
79
if ( signal ) {
75
80
oncancel = FunctionPrototypeBind ( cancelListenerHandler ,
76
- // eslint-disable-next-line no-undef
77
81
timeout , clearTimeout , reject ) ;
78
82
signal . addEventListener ( 'abort' , oncancel ) ;
79
83
}
@@ -117,7 +121,6 @@ function setImmediate(value, options = {}) {
117
121
if ( ! ref ) immediate . unref ( ) ;
118
122
if ( signal ) {
119
123
oncancel = FunctionPrototypeBind ( cancelListenerHandler ,
120
- // eslint-disable-next-line no-undef
121
124
immediate , clearImmediate , reject ) ;
122
125
signal . addEventListener ( 'abort' , oncancel ) ;
123
126
}
@@ -152,7 +155,6 @@ async function* setInterval(after, value, options = {}) {
152
155
insert ( interval , interval . _idleTimeout ) ;
153
156
if ( signal ) {
154
157
onCancel = ( ) => {
155
- // eslint-disable-next-line no-undef
156
158
clearInterval ( interval ) ;
157
159
if ( callback ) {
158
160
callback ( PromiseReject ( new AbortError ( ) ) ) ;
@@ -172,7 +174,6 @@ async function* setInterval(after, value, options = {}) {
172
174
}
173
175
throw new AbortError ( ) ;
174
176
} finally {
175
- // eslint-disable-next-line no-undef
176
177
clearInterval ( interval ) ;
177
178
signal ?. removeEventListener ( 'abort' , onCancel ) ;
178
179
}
0 commit comments