kopia lustrzana https://github.com/Tldraw/Tldraw
5 wiersze
129 B
TypeScript
5 wiersze
129 B
TypeScript
![]() |
export function interval(cb: () => void, timeout: number) {
|
||
|
const i = setInterval(cb, timeout)
|
||
|
return () => clearInterval(i)
|
||
|
}
|