Skip to content

Type-ensured validator should assert return type #17

@dbartholomae

Description

@dbartholomae

Hi there!

Currently I have to manually do this:

export const assertPostMetaData: (
  data: unknown
) => asserts data is PostMetaData = compile(postMetaDataSchema, {
  ensure: true,
});

Would be nice if this type definition could be baked into suretype. I might be able to provide a PR :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions