diff --git a/packages/effect-fc/src/Form.ts b/packages/effect-fc/src/Form.ts index 1a2196e..5c37310 100644 --- a/packages/effect-fc/src/Form.ts +++ b/packages/effect-fc/src/Form.ts @@ -1,4 +1,4 @@ -import { Array, Cause, Chunk, type Context, type Duration, Effect, Equal, Exit, Fiber, identity, Option, ParseResult, Pipeable, Predicate, Schema, type Scope, Stream } from "effect" +import { Array, Cause, Chunk, type Context, type Duration, Effect, Equal, Exit, Fiber, Function, identity, Option, ParseResult, Pipeable, Predicate, Schema, type Scope, Stream } from "effect" import type * as React from "react" import * as Component from "./Component.js" import * as Lens from "./Lens.js" @@ -246,7 +246,15 @@ const filterIssuesByPath = ( issue.path.length >= path.length && Array.every(path, (p, i) => p === issue.path[i]) ) -export const focusObjectField =
( +export const focusObjectField: { +
( + self: Form
,
+ key: K,
+ ): Form (
+ key: K,
+ ): (self: Form ) => Form (
self: Form ,
key: K,
): Form (
+export const focusArrayAt: {
+ (
+ self: Form ,
+ index: number,
+ ): Form (
+ index: number,
+ ): (self: Form ) => Form (
self: Form ,
index: number,
): Form