From 6bdf2a4d87242615b65171ca8f94437e05d4d574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Sun, 19 Oct 2025 02:51:43 +0200 Subject: [PATCH] submit -> submitFn --- packages/effect-fc/src/Form.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/effect-fc/src/Form.ts b/packages/effect-fc/src/Form.ts index 8d032ba..11b2a62 100644 --- a/packages/effect-fc/src/Form.ts +++ b/packages/effect-fc/src/Form.ts @@ -16,7 +16,7 @@ extends Pipeable.Pipeable { readonly [FormTypeId]: FormTypeId readonly schema: Schema.Schema - readonly submit: (value: NoInfer) => Effect.Effect + readonly submitFn: (value: NoInfer) => Effect.Effect readonly debounce: Option.Option readonly valueRef: SubscriptionRef.SubscriptionRef> @@ -34,7 +34,7 @@ extends Pipeable.Class() implements Form { constructor( readonly schema: Schema.Schema, - readonly submit: (value: NoInfer) => Effect.Effect, + readonly submitFn: (value: NoInfer) => Effect.Effect, readonly debounce: Option.Option, readonly valueRef: SubscriptionRef.SubscriptionRef>, @@ -55,7 +55,7 @@ export namespace make { export interface Options { readonly schema: Schema.Schema readonly initialEncodedValue: NoInfer - readonly submit: (value: NoInfer) => Effect.Effect, + readonly submitFn: (value: NoInfer) => Effect.Effect, readonly debounce?: Duration.DurationInput, } } @@ -74,7 +74,7 @@ export const make: { return new FormImpl( options.schema, - options.submit, + options.submitFn, Option.fromNullable(options.debounce), valueRef, @@ -156,7 +156,7 @@ export const submit = ( Effect.andThen(identity), Effect.tap(Ref.set(self.submitStateRef, AsyncData.loading())), Effect.andThen(flow( - self.submit as (value: NoInfer) => Effect.Effect, + self.submitFn as (value: NoInfer) => Effect.Effect, Effect.tapErrorTag("ParseError", e => Ref.set(self.errorRef, Option.some(e as ParseResult.ParseError))), Effect.exit, Effect.map(Exit.match({