@cripty2001/utils 0.0.21 → 0.0.23
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.
- package/dist/index.d.ts +1 -1
- package/dist/react-whispr.js +1 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type AtLeastOne<T> = {
|
|
|
9
9
|
export type ExactlyOne<T> = {
|
|
10
10
|
[K in keyof T]: Pick<T, K> & Partial<Record<Exclude<keyof T, K>, never>>;
|
|
11
11
|
}[keyof T];
|
|
12
|
-
export type
|
|
12
|
+
export type AllRequired<T> = T extends ExactlyOne<infer U> ? ExactlyOne<Required<U>> : never;
|
|
13
13
|
export declare function getRandom(_alphabeth: string, length: number): string;
|
|
14
14
|
export declare function getRandomId(length?: number): string;
|
|
15
15
|
export declare function getRandomOtp(length?: number, char?: boolean): string;
|
package/dist/react-whispr.js
CHANGED
|
@@ -89,9 +89,7 @@ function useAsync(f, data, debouce = 200) {
|
|
|
89
89
|
// Initing reactive input
|
|
90
90
|
const [input, setInput] = whispr_1.Whispr.create(data);
|
|
91
91
|
(0, react_1.useEffect)(() => {
|
|
92
|
-
|
|
93
|
-
return;
|
|
94
|
-
setInput(data);
|
|
92
|
+
setInput(data); // Debouncing already handled by dispatcher
|
|
95
93
|
}, [data, input, setInput]);
|
|
96
94
|
// Initing dispatcher
|
|
97
95
|
const dispatcher = (0, react_1.useRef)(new Dispatcher_1.Dispatcher(input, f, debouce)).current;
|
package/package.json
CHANGED