Combining Two Schemas in TypeScript for Unified Treatment
Hi, is there a way to 'intersect' or merge two schemas so that they're treated like one?
For example:
For example:
...
class UserEntity<T> extends BaseEntity {
constructor(props: T & BaseEntityProps, schema: S.Schema<T & BaseEntityProps>) {
super(props, S.intersect(schema, baseEntitySchema)); // is there a way to do this?
}
...