Hi guys, thanks for this amazing library!
I wonder if there is a way how to extend predicates or compose a new one using a set of others.
Here is a use case:
interface User {
id: string;
email: string;
}
const assertUser = ow.create('User', ow.object.partialShape({
id: ow.string.nonEmpty,
email: ow.string.nonEmpty,
}))
interface Person extends User {
firstName: string;
lastName: string;
}
const assertPerson = ow.create('Person', ow.object.partialShape({
id: ow.string.nonEmpty,
email: ow.string.nonEmpty,
firstName: ow.string.nonEmpty,
lastName: ow.string.nonEmpty,
}))
I would love to be able to avoid code duplication.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too