@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.
@@ -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: (pending: boolean) => void): [
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
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cripty2001/utils",
3
- "version": "0.0.168",
3
+ "version": "0.0.169",
4
4
  "description": "Internal Set of utils. If you need them use them, otherwise go to the next package ;)",
5
5
  "homepage": "https://github.com/cripty2001/utils#readme",
6
6
  "bugs": {