DefinitelyTyped/types/long-timeout/long-timeout-tests.ts
Matthias Kunnen c7a768fca6
🤖 Merge PR #46642 feat(long-timeout): new type definition by @MatthiasKunnen
* feat(long-timeout): new type definition

* fix(long-timeout): remove export as namespace

long-timeout does not have a UMD wrapper.
2020-08-12 19:38:28 -04:00

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);