Files
DefinitelyTyped/types/debounce/debounce-tests.ts
Karol Janyst 7290661a96 Fix export for debounce, add tslint.json (#16035)
* Fix export for debounce, add tslint.json

* Add clear method
2017-04-21 07:29:22 -07:00

16 lines
337 B
TypeScript

import debounce = require("debounce");
const doThings = () => 1;
debounce(doThings)();
debounce(doThings, 1000)();
debounce((a: string) => doThings, 1000)("foo");
// Immediate true should return the value
const imm1: number = (debounce((x: number) => x * 2, 100, true))(2);
const clearable = debounce(doThings);
clearable.clear();