0.1.4 #5

Merged
Thilawyn merged 67 commits from next into master 2025-10-02 18:18:23 +02:00
Showing only changes of commit ecc37515b8 - Show all commits

View File

@@ -122,16 +122,13 @@ extends Pipeable.Class() implements Form<A, I, R> {
} }
export const make = <A, I = A, R = never>( export const make: {
options: make.Options<A, I, R> <A, I = A, R = never>(options: make.Options<A, I, R>): Effect.Effect<Form<A, I, R>>
): Effect.Effect<Form<A, I, R>> => Effect.gen(function*() { } = Effect.fnUntraced(function* <A, I = A, R = never>(options: make.Options<A, I, R>) {
const latestValueRef = yield* SubscriptionRef.make(options.initialValue)
const errorRef = yield* SubscriptionRef.make(Option.none<ParseResult.ParseError>())
return new FormImpl( return new FormImpl(
options.schema, options.schema,
latestValueRef, yield* SubscriptionRef.make(options.initialValue),
errorRef, yield* SubscriptionRef.make(Option.none<ParseResult.ParseError>()),
) )
}) })