@cripty2001/utils 0.0.168 → 0.0.169
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/react-whispr.d.ts +1 -1
- package/dist/react-whispr.js +1 -1
- package/package.json +1 -1
package/dist/react-whispr.d.ts
CHANGED
|
@@ -194,7 +194,7 @@ export type AsyncInputValue<C extends Record<string, JSONEncodable>, R extends R
|
|
|
194
194
|
* The returned `result` will lag behind `value` during async processing. Consider showing a loader or some other similar indication
|
|
195
195
|
* Handler is NOT reactive. Conceptually it is a pure function that derives an async status from the value input, so there is no reason for it to be reactive, and this saves a lot heachaches with react reactivity loops.
|
|
196
196
|
*/
|
|
197
|
-
export declare function useAsyncInput<C extends Record<string, JSONEncodable>, R extends Record<string, JSONEncodable>>(value: AsyncInputValue<C, R>, setValue: (value: AsyncInputValue<C, R>) => void, handler: (config: C) => Promise<R>, setPending
|
|
197
|
+
export declare function useAsyncInput<C extends Record<string, JSONEncodable>, R extends Record<string, JSONEncodable>>(value: AsyncInputValue<C, R>, setValue: (value: AsyncInputValue<C, R>) => void, handler: (config: C) => Promise<R>, setPending?: (pending: boolean) => void): [
|
|
198
198
|
value: C,
|
|
199
199
|
setValue: (updater: (draft: C) => C | void) => void,
|
|
200
200
|
result: R | null
|
package/dist/react-whispr.js
CHANGED
|
@@ -354,7 +354,7 @@ function useSafeRef(value) {
|
|
|
354
354
|
* The returned `result` will lag behind `value` during async processing. Consider showing a loader or some other similar indication
|
|
355
355
|
* Handler is NOT reactive. Conceptually it is a pure function that derives an async status from the value input, so there is no reason for it to be reactive, and this saves a lot heachaches with react reactivity loops.
|
|
356
356
|
*/
|
|
357
|
-
function useAsyncInput(value, setValue, handler, setPending) {
|
|
357
|
+
function useAsyncInput(value, setValue, handler, setPending = () => { }) {
|
|
358
358
|
const [meta, setMeta] = (0, react_1.useState)({
|
|
359
359
|
config: value._meta.config,
|
|
360
360
|
ts: value._meta.ts
|
package/package.json
CHANGED