class User extends Schema.Class<User>("User")({
id: Schema.NonEmptyTrimmedString,
name: Schema.NonEmptyTrimmedString,
createdAt: Schema.propertySignature(
Schema.DateFromSelf,
).pipe(Schema.fromKey("created_at")),
}){}
const CreateUser = User.pipe(
// Is this a bug as we are missing both
// created_at and createdAt?
Schema.omit('createdAt')
)
class User extends Schema.Class<User>("User")({
id: Schema.NonEmptyTrimmedString,
name: Schema.NonEmptyTrimmedString,
createdAt: Schema.propertySignature(
Schema.DateFromSelf,
).pipe(Schema.fromKey("created_at")),
}){}
const CreateUser = User.pipe(
// Is this a bug as we are missing both
// created_at and createdAt?
Schema.omit('createdAt')
)