@@ -260,7 +260,6 @@ export namespace useInput {
|
||||
export interface Result<T> {
|
||||
readonly value: T
|
||||
readonly setValue: React.Dispatch<React.SetStateAction<T>>
|
||||
readonly issues: readonly ParseResult.ArrayFormatterIssue[]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,7 +274,6 @@ export const useInput: {
|
||||
) {
|
||||
const internalValueRef = yield* Hooks.useMemo(() => Effect.andThen(field.encodedValueRef, SubscriptionRef.make), [field])
|
||||
const [value, setValue] = yield* Hooks.useRefState(internalValueRef)
|
||||
const [issues] = yield* Hooks.useSubscribables(field.issuesSubscribable)
|
||||
|
||||
yield* Hooks.useFork(() => Effect.all([
|
||||
Stream.runForEach(
|
||||
@@ -296,7 +294,7 @@ export const useInput: {
|
||||
),
|
||||
], { concurrency: "unbounded" }), [field, internalValueRef, options?.debounce])
|
||||
|
||||
return { value, setValue, issues }
|
||||
return { value, setValue }
|
||||
})
|
||||
|
||||
export namespace useOptionalInput {
|
||||
@@ -329,7 +327,6 @@ export const useOptionalInput: {
|
||||
|
||||
const [enabled, setEnabled] = yield* Hooks.useRefState(enabledRef)
|
||||
const [value, setValue] = yield* Hooks.useRefState(internalValueRef)
|
||||
const [issues] = yield* Hooks.useSubscribables(field.issuesSubscribable)
|
||||
|
||||
yield* Hooks.useFork(() => Effect.all([
|
||||
Stream.runForEach(
|
||||
@@ -365,5 +362,5 @@ export const useOptionalInput: {
|
||||
),
|
||||
], { concurrency: "unbounded" }), [field, enabledRef, internalValueRef, options.debounce])
|
||||
|
||||
return { enabled, setEnabled, value, setValue, issues }
|
||||
return { enabled, setEnabled, value, setValue }
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user