Skip to content

Commit 11d1eb4

Browse files
committed
Fix lint errors
1 parent 5133099 commit 11d1eb4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/debounce/debounce.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function debounce<TFunc extends TAnyFunction<void>>(
2020
): FunctionWithVoidReturn<TFunc> {
2121
let timeoutID: NodeJS.Timeout | null = null
2222

23-
return function (this: unknown, ...args: unknown[]) {
23+
return function (this: unknown, ...args: Array<unknown>) {
2424
if (timeoutID) clearTimeout(timeoutID)
2525
timeoutID = setTimeout(() => func.apply(this, args), wait)
2626
} as FunctionWithVoidReturn<TFunc>

src/flatten/flatten.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
type Entry = { key: string; value: unknown; optional: boolean }
1313

14-
type Explode<T> = _Explode<T extends readonly unknown[] ? { '0': T[number] } : T>
14+
type Explode<T> = _Explode<T extends ReadonlyArray<unknown> ? { '0': T[number] } : T>
1515

1616
type _Explode<T> = T extends object
1717
? {

src/throttle/throttle.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function throttle<TFunc extends TAnyFunction<void>>(
2121
let timeoutID: NodeJS.Timeout | null = null
2222
let lastCall = 0
2323

24-
return function (this: unknown, ...args: unknown[]) {
24+
return function (this: unknown, ...args: Array<unknown>) {
2525
if (timeoutID) clearTimeout(timeoutID)
2626

2727
const remainingWait = wait - (Date.now() - lastCall)

src/typeHelpers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export type JSONValue = string | number | boolean | null | undefined | JSONObjec
44
type JSONObject = { [key: string]: JSONValue }
55
type JSONArray = Array<JSONValue>
66

7-
export type TAnyFunction<TReturn> = (...args: any[]) => TReturn
7+
export type TAnyFunction<TReturn> = (...args: Array<any>) => TReturn
88

99
export type Simplify<T> = T extends unknown ? { [K in keyof T]: Simplify<T[K]> } : never
1010

0 commit comments

Comments
 (0)