0.1.4 #5
@@ -11,19 +11,19 @@ export type TypeId = typeof TypeId
|
||||
export interface Form<in out A, in out I = A, out R = never>
|
||||
extends Pipeable.Pipeable {
|
||||
readonly schema: Schema.Schema<A, I, R>
|
||||
readonly latestValueSubscribable: Subscribable.Subscribable<NoInfer<A>>
|
||||
readonly latestValueSubscribable: Subscribable.Subscribable<A>
|
||||
|
||||
useFieldLatestValueSubscribable<P extends PropertyPath.Paths<NoInfer<A>>>(
|
||||
useFieldLatestValueSubscribable<P extends PropertyPath.Paths<A>>(
|
||||
path: P
|
||||
): Subscribable.Subscribable<PropertyPath.ValueFromPath<NoInfer<A>, P>, NoSuchElementException>
|
||||
): Subscribable.Subscribable<PropertyPath.ValueFromPath<A, P>, NoSuchElementException>
|
||||
useFieldIssuesSubscribable(
|
||||
path: PropertyPath.Paths<NoInfer<A>>
|
||||
path: PropertyPath.Paths<A>
|
||||
): Subscribable.Subscribable<readonly ParseResult.ArrayFormatterIssue[]>
|
||||
|
||||
useInput<P extends PropertyPath.Paths<NoInfer<I>>>(
|
||||
useInput<P extends PropertyPath.Paths<I>>(
|
||||
path: P
|
||||
): Effect.Effect<
|
||||
Form.useInput.Result<PropertyPath.ValueFromPath<NoInfer<I>, P>>,
|
||||
Form.useInput.Result<PropertyPath.ValueFromPath<I, P>>,
|
||||
ParseResult.ParseError | NoSuchElementException,
|
||||
R
|
||||
>
|
||||
@@ -43,18 +43,18 @@ export namespace Form {
|
||||
class FormImpl<in out A, in out I, out R>
|
||||
extends Pipeable.Class() implements Form<A, I, R> {
|
||||
readonly [TypeId]: TypeId = TypeId
|
||||
readonly latestValueSubscribable: Subscribable.Subscribable<NoInfer<A>>
|
||||
readonly latestValueSubscribable: Subscribable.Subscribable<A>
|
||||
|
||||
constructor(
|
||||
readonly schema: Schema.Schema<A, I, R>,
|
||||
readonly latestValueRef: SubscriptionRef.SubscriptionRef<NoInfer<A>>,
|
||||
readonly latestValueRef: SubscriptionRef.SubscriptionRef<A>,
|
||||
readonly errorRef: SubscriptionRef.SubscriptionRef<Option.Option<ParseResult.ParseError>>,
|
||||
) {
|
||||
super()
|
||||
this.latestValueSubscribable = latestValueRef
|
||||
}
|
||||
|
||||
useFieldLatestValueSubscribable<P extends PropertyPath.Paths<NoInfer<A>>>(
|
||||
useFieldLatestValueSubscribable<P extends PropertyPath.Paths<A>>(
|
||||
path: P
|
||||
) {
|
||||
return React.useMemo(() => {
|
||||
@@ -67,7 +67,7 @@ extends Pipeable.Class() implements Form<A, I, R> {
|
||||
}
|
||||
|
||||
useFieldIssuesSubscribable(
|
||||
path: PropertyPath.Paths<NoInfer<A>>
|
||||
path: PropertyPath.Paths<A>
|
||||
) {
|
||||
return React.useMemo(() => {
|
||||
const filter = Option.match({
|
||||
|
||||
Reference in New Issue
Block a user