Skip to content

Types are incorrect for schema, where input & output are different #396

@pawelblaszczyk5

Description

@pawelblaszczyk5

Hello 👋

It seems like currently intended way is that schema is used for validating, but isn't impacting parsed return values:

// Return the original update data, not the merged data
// We only used the merged data for validation
return data as T

Is it set in stone? That limits a lot of usages for schemas, I'd love to see it work.

If it's not possible, is it feasible to make it work on a type level? Currently it just silently works and user won't know he has invalid types.

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