Working field
Lint / lint (push) Successful in 12s

This commit is contained in:
Julien Valverdé
2025-09-30 15:54:59 +02:00
parent 47e21f6340
commit 040e671fd3
3 changed files with 53 additions and 38 deletions
+2 -5
View File
@@ -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 }
})