File tree 4 files changed +4
-4
lines changed
4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export function debounce<TFunc extends TAnyFunction<void>>(
20
20
) : FunctionWithVoidReturn < TFunc > {
21
21
let timeoutID : NodeJS . Timeout | null = null
22
22
23
- return function ( this : unknown , ...args : unknown [ ] ) {
23
+ return function ( this : unknown , ...args : Array < unknown > ) {
24
24
if ( timeoutID ) clearTimeout ( timeoutID )
25
25
timeoutID = setTimeout ( ( ) => func . apply ( this , args ) , wait )
26
26
} as FunctionWithVoidReturn < TFunc >
Original file line number Diff line number Diff line change 11
11
12
12
type Entry = { key : string ; value : unknown ; optional : boolean }
13
13
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 >
15
15
16
16
type _Explode < T > = T extends object
17
17
? {
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export function throttle<TFunc extends TAnyFunction<void>>(
21
21
let timeoutID : NodeJS . Timeout | null = null
22
22
let lastCall = 0
23
23
24
- return function ( this : unknown , ...args : unknown [ ] ) {
24
+ return function ( this : unknown , ...args : Array < unknown > ) {
25
25
if ( timeoutID ) clearTimeout ( timeoutID )
26
26
27
27
const remainingWait = wait - ( Date . now ( ) - lastCall )
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export type JSONValue = string | number | boolean | null | undefined | JSONObjec
4
4
type JSONObject = { [ key : string ] : JSONValue }
5
5
type JSONArray = Array < JSONValue >
6
6
7
- export type TAnyFunction < TReturn > = ( ...args : any [ ] ) => TReturn
7
+ export type TAnyFunction < TReturn > = ( ...args : Array < any > ) => TReturn
8
8
9
9
export type Simplify < T > = T extends unknown ? { [ K in keyof T ] : Simplify < T [ K ] > } : never
10
10
You can’t perform that action at this time.
0 commit comments