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