DefinitelyTyped/types/toobusy-js/toobusy-js-tests.ts
2018-12-05 15:38:58 +01:00

26 lines
603 B
TypeScript

import toobusy = require('toobusy-js');
let numberValue = 1;
let booleanValue = true;
booleanValue = toobusy();
booleanValue = toobusy.started();
numberValue = toobusy.interval(numberValue);
numberValue = toobusy.interval();
numberValue = toobusy.lag();
numberValue = toobusy.maxLag(numberValue);
numberValue = toobusy.maxLag();
numberValue = toobusy.smoothingFactor(numberValue);
numberValue = toobusy.smoothingFactor();
toobusy.shutdown();
toobusy.onLag(duration => {
// $ExpectType number
duration;
});
toobusy.onLag(duration => {
// $ExpectType number
duration;
}, numberValue);