Add debounce to a function.
type or interface of origin function.
debounce time.
The behavior is the same as origin function, but with debounce.
const origin = () => ...;
const result = debounce(250)(origin);
class Greeter {
greeting: string;
constructor(message: string) {
this.greeting = message;
}
@debounce(500)
greet = () => `Hello, ${this.greeting}`;
}
Generated using TypeDoc
decorator