()
| 119 | const start = Date.now(); |
| 120 | let result: unknown; |
| 121 | const done = () => { |
| 122 | throttlingAsync = false; |
| 123 | lastExecution = Date.now(); |
| 124 | if (typeof timeframe === "function") { |
| 125 | tf = timeframe(lastExecution - start); |
| 126 | } |
| 127 | }; |
| 128 | try { |
| 129 | clearTimeout(timeout); |
| 130 | result = fn.call(throttled, ...args); |