All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- π₯ [breaking] improve type inference thanks @juanmendes for the idea
- since we're improving types in some scenarios (instead of
anyyou can get more precise types) this can break your type checks
- since we're improving types in some scenarios (instead of
const inputs = document.querySelectorAll("input");
inputs[0].addEventListener(
"input",
debounce((event) => {
// here Event has `Event` type, before it was just `any`
expectType<EventTarget | null>(event.target);
}, 0),
);- π§ͺ introduce tsd type testing
- π new add past contributors
- π Add Prettier, format files
- β¨ [new] support for promises (thanks @sanduluca)
- β¨ [new] support for callback (thanks @sanduluca)
- π [new] Update docs in relation to this release
- π₯ [breaking]
ts-debounceassumes that Promise is available
- β¨ [new] added ES module key to support ES module import
- π [changed] updated docs
- β¨ [new] maxWait option added
- β¨ [new] Now it's possible to cancel debounced function
- π¦ [changed] Updated packages
- [Fixed] removed unneeded cache files from distributed npm package
- [changed] improved type of returned function (thanks @zacnomore)
- [changed] use microbundle package for compilation
- [changed] updated dev dependencies to newest versions
- [changed] loosen up Node requirement to include Node 8
- [changed] start using all-contributors format for contributions
- [breaking] third argument is now an object with one argument, this will allow to add further options int the future without breaking API