File tree 3 files changed +12
-13
lines changed
3 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -9917,3 +9917,5 @@ type blobCallback = blob => unit
9917
9917
type videoFrameRequestCallback = float => videoFrameCallbackMetadata => unit
9918
9918
9919
9919
type frameRequestCallback = float => unit
9920
+
9921
+ type timeoutId
Original file line number Diff line number Diff line change @@ -27,22 +27,20 @@ external btoa: (window, string) => string = "btoa"
27
27
external atob : (window , string ) => string = "atob"
28
28
29
29
/**
30
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
31
- */
32
- @send
33
- external setTimeout : (window , ~handler : string , ~timeout : int = ?) => int = "setTimeout"
30
+ Executes a function after a delay given in milliseconds expires.
34
31
35
- /**
36
32
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
37
33
*/
38
34
@send
39
- external setTimeout2 : (window , ~handler : unit => unit , ~timeout : int = ?) => int = "setTimeout"
35
+ external setTimeout : (window , ~handler : unit => unit , ~timeout : int = ?) => timeoutId = "setTimeout"
40
36
41
37
/**
38
+ Cancels the execution of a timeout created with setTimeout.
39
+
42
40
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/clearTimeout)
43
41
*/
44
42
@send
45
- external clearTimeout : (window , int ) => unit = "clearTimeout"
43
+ external clearTimeout : (window , timeoutId ) => unit = "clearTimeout"
46
44
47
45
/**
48
46
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setInterval)
Original file line number Diff line number Diff line change @@ -260,19 +260,18 @@ external btoa: string => string = "btoa"
260
260
external atob : string => string = "atob"
261
261
262
262
/**
263
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
264
- */
265
- external setTimeout : (~handler : string , ~timeout : int = ?) => int = "setTimeout"
263
+ Executes a function after a delay given in milliseconds expires.
266
264
267
- /**
268
265
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
269
266
*/
270
- external setTimeout2 : (~handler : unit => unit , ~timeout : int = ?) => int = "setTimeout"
267
+ external setTimeout : (~handler : unit => unit , ~timeout : int = ?) => timeoutId = "setTimeout"
271
268
272
269
/**
270
+ Cancels the execution of a timeout created with setTimeout.
271
+
273
272
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/clearTimeout)
274
273
*/
275
- external clearTimeout : int => unit = "clearTimeout"
274
+ external clearTimeout : timeoutId => unit = "clearTimeout"
276
275
277
276
/**
278
277
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setInterval)
You can’t perform that action at this time.
0 commit comments