mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
* feat(long-timeout): new type definition * fix(long-timeout): remove export as namespace long-timeout does not have a UMD wrapper.
16 lines
243 B
TypeScript
16 lines
243 B
TypeScript
import * as lt from 'long-timeout';
|
|
|
|
const interval = lt.setInterval(() => {
|
|
// Do things
|
|
}, 4000);
|
|
|
|
interval.close();
|
|
|
|
lt.clearInterval(interval);
|
|
|
|
const timeout = lt.setTimeout(() => {
|
|
// Do things
|
|
}, 50);
|
|
|
|
lt.clearTimeout(timeout);
|