fix strictBindCallApply (closes #8576)

pull/8579/head
Niklas Fiekas 2021-04-05 15:26:38 +02:00
parent 0349fdbed0
commit 54102d786c
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,8 @@
type Debounced = (...args: any[]) => any;
export default function debounce(func: (...args: any[]) => any, wait: number, immediate = false): Debounced {
export default function debounce<T extends (...args: any) => void>(
func: T,
wait: number,
immediate = false
): (...args: Parameters<T>) => void {
let timeout: Timeout | undefined,
lastBounce = 0;
return function (this: any) {

View File

@ -1,7 +1,6 @@
{
"compilerOptions": {
"strict": true,
"strictBindCallApply": false,
"strictFunctionTypes": false,
"strictPropertyInitialization": false,
"noUnusedLocals": true,