seitu 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Readable, Subscribable } from './subscription';
|
|
2
|
-
export interface DebouncedFn<
|
|
3
|
-
(...args:
|
|
2
|
+
export interface DebouncedFn<F extends (...args: any[]) => any> extends Readable<ReturnType<F> | undefined>, Subscribable<ReturnType<F> | undefined> {
|
|
3
|
+
(...args: Parameters<F>): void;
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* Wraps a plain function in a debounced callable that also acts as a subscribable.
|
|
@@ -18,4 +18,4 @@ export interface DebouncedFn<A extends unknown[], R> extends Readable<R | undefi
|
|
|
18
18
|
* search.get() // latest return value (undefined until first call)
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
export declare function createDebounceFn<
|
|
21
|
+
export declare function createDebounceFn<F extends (...args: any[]) => any>(fn: F, wait: number): DebouncedFn<F>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Readable, Subscribable } from './subscription';
|
|
2
|
-
export interface ThrottledFn<
|
|
3
|
-
(...args:
|
|
2
|
+
export interface ThrottledFn<F extends (...args: any[]) => any> extends Readable<ReturnType<F> | undefined>, Subscribable<ReturnType<F> | undefined> {
|
|
3
|
+
(...args: Parameters<F>): void;
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* Wraps a plain function in a throttled callable that also acts as a subscribable.
|
|
@@ -20,4 +20,4 @@ export interface ThrottledFn<A extends unknown[], R> extends Readable<R | undefi
|
|
|
20
20
|
* log.get() // latest return value (undefined until first call)
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
export declare function createThrottleFn<
|
|
23
|
+
export declare function createThrottleFn<F extends (...args: any[]) => any>(fn: F, wait: number): ThrottledFn<F>;
|