Skip to content

Typescript Error On Optional And Nullable Fields With exactOptionalPropertyTypes #141

@AdrianAndersen

Description

@AdrianAndersen

Package version

4.3.0

Describe the bug

Hello,

I just upgraded to 4.3.0, and migrated to vine.create(...). I am currently facing an issue where every optional or nullable field produces the following TS error:

TS2375: Type OptionalModifier<VineString> is not assignable to type SchemaTypes with 'exactOptionalPropertyTypes: true'.

Currently, I just have to disable this rule, but I would love for VineJS to work with this enabled by default.

Let me know if I am missing something, or if you need more details.

Reproduction repo

No response

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