0.1.19 (#20)
Co-authored-by: Julien Valverdé <julien.valverde@mailo.com> Reviewed-on: #20
This commit was merged in pull request #20.
This commit is contained in:
@@ -3,12 +3,12 @@ import { makeObservable, observable, type CreateObservableOptions } from "mobx"
|
||||
import { mapValues } from "remeda"
|
||||
|
||||
|
||||
interface ObservableClassSelf {
|
||||
export interface ObservableClassSelf {
|
||||
new(...args: any[]): Schema.Struct.Type<Schema.Struct.Fields>
|
||||
readonly fields: { readonly [K in keyof Schema.Struct.Fields]: Schema.Struct.Fields[K] }
|
||||
}
|
||||
|
||||
interface ObservableClassOptions extends Omit<CreateObservableOptions, "proxy"> {}
|
||||
export interface ObservableClassOptions extends Omit<CreateObservableOptions, "proxy"> {}
|
||||
|
||||
export const ObservableClass = (options?: ObservableClassOptions) =>
|
||||
<Self extends ObservableClassSelf>(self: Self) =>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Schema } from "@effect/schema"
|
||||
|
||||
|
||||
export const Email = Schema.pattern(
|
||||
export const email = Schema.pattern(
|
||||
/^(?!\.)(?!.*\.\.)([A-Z0-9_+-.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9-]*\.)+[A-Z]{2,}$/i,
|
||||
|
||||
{
|
||||
identifier: "Email",
|
||||
identifier: "email",
|
||||
title: "email",
|
||||
message: () => "Not an email address",
|
||||
},
|
||||
@@ -1,6 +1,6 @@
|
||||
export * from "./Class"
|
||||
export * from "./DateTime"
|
||||
export * from "./Email"
|
||||
export * from "./email"
|
||||
export * from "./encodedAsPrismaJsonValue"
|
||||
export * from "./Kind"
|
||||
export * as MobX from "./MobX"
|
||||
|
||||
Reference in New Issue
Block a user