Skip to content

3.0.2 typescript error TS2322 on subscriptions #125

@rosskevin

Description

@rosskevin

Are you submitting a bug report or a feature request?

Bug

What is the current behavior?

I introduced changes in final-form/final-form#61 that produce typescript errors.

What is the expected behavior?

One example:

error TS2322: Type '{ subscription: { errors: true; values: true; }; children: (form: FormSpyRenderProps) => Element; }' is not assignable to type 'IntrinsicAttributes & FormSpyProps & { children?: ReactNode; }'.
  Type '{ subscription: { errors: true; values: true; }; children: (form: FormSpyRenderProps) => Element; }' is not assignable to type 'FormSpyProps'.
    Types of property 'subscription' are incompatible.
      Type '{ errors: true; values: true; }' is not assignable to type 'FormSubscription'.
        Property 'active' is missing in type '{ errors: true; values: true; }'.

What's your environment?

final-form ^4.0.1
react-final-form ^3.0.2

Other information

I created the problem, I'll PR the fix ASAP. Working on it now. I will probably PR tests here as well (Closes #108)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions