suretype
suretype copied to clipboard
Type-ensured validator should assert return type
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 :)