DEV Community

Discussion on: Create a debounce function from scratch in typescript

Collapse
 
mumu profile image
Murph Murphy

Another improvement is to use A extends any[] instead of A = unknown, then ...args: A anywhere args shows up right now. It allows for any number of arguments, but keeps them well typed and ordered.

Collapse
 
bwca profile image
Volodymyr Yepishev • Edited

Good observation 👍🙂

I came up with a similar approach in the end, guess I should write a follow up post 😁