File tree Expand file tree Collapse file tree 3 files changed +12
-13
lines changed Expand file tree Collapse file tree 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
99179917type videoFrameRequestCallback = float => videoFrameCallbackMetadata => unit
99189918
99199919type 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"
2727external atob : (window , string ) => string = "atob"
2828
2929/**
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.
3431
35- /**
3632[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
3733*/
3834@send
39- external setTimeout2 : (window , ~handler : unit => unit , ~timeout : int = ?) => int = "setTimeout"
35+ external setTimeout : (window , ~handler : unit => unit , ~timeout : int = ?) => timeoutId = "setTimeout"
4036
4137/**
38+ Cancels the execution of a timeout created with setTimeout.
39+
4240[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/clearTimeout)
4341*/
4442@send
45- external clearTimeout : (window , int ) => unit = "clearTimeout"
43+ external clearTimeout : (window , timeoutId ) => unit = "clearTimeout"
4644
4745/**
4846[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"
260260external atob : string => string = "atob"
261261
262262/**
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.
266264
267- /**
268265[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
269266*/
270- external setTimeout2 : (~handler : unit => unit , ~timeout : int = ?) => int = "setTimeout"
267+ external setTimeout : (~handler : unit => unit , ~timeout : int = ?) => timeoutId = "setTimeout"
271268
272269/**
270+ Cancels the execution of a timeout created with setTimeout.
271+
273272[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/clearTimeout)
274273*/
275- external clearTimeout : int => unit = "clearTimeout"
274+ external clearTimeout : timeoutId => unit = "clearTimeout"
276275
277276/**
278277[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