0.1.6 #7
@@ -1,17 +1,17 @@
|
|||||||
import { Schema as S } from "@effect/schema"
|
import { Schema } from "@effect/schema"
|
||||||
import type { HasFields } from "./util"
|
import type { HasFields } from "./util"
|
||||||
|
|
||||||
|
|
||||||
export const Class = S.Class as <Self>(identifier: string) =>
|
export const Class = Schema.Class as <Self>(identifier: string) =>
|
||||||
<Fields extends S.Struct.Fields>(
|
<Fields extends Schema.Struct.Fields>(
|
||||||
fieldsOr: Fields | HasFields<Fields>,
|
fieldsOr: Fields | HasFields<Fields>,
|
||||||
annotations?: S.Annotations.Schema<Self>,
|
annotations?: Schema.Annotations.Schema<Self>,
|
||||||
) => S.Class<
|
) => Schema.Class<
|
||||||
Self,
|
Self,
|
||||||
Fields,
|
Fields,
|
||||||
S.Struct.Encoded<Fields>,
|
Schema.Struct.Encoded<Fields>,
|
||||||
S.Struct.Context<Fields>,
|
Schema.Struct.Context<Fields>,
|
||||||
S.Struct.Constructor<Fields>,
|
Schema.Struct.Constructor<Fields>,
|
||||||
{},
|
{},
|
||||||
{}
|
{}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
import { Schema as S } from "@effect/schema"
|
import { Schema } from "@effect/schema"
|
||||||
import type { HasFields } from "./util"
|
import type { HasFields } from "./util"
|
||||||
|
|
||||||
|
|
||||||
export const TaggedClass = S.TaggedClass as <Self>(identifier?: string) =>
|
export const TaggedClass = Schema.TaggedClass as <Self>(identifier?: string) =>
|
||||||
<
|
<
|
||||||
Tag extends string,
|
Tag extends string,
|
||||||
Fields extends S.Struct.Fields,
|
Fields extends Schema.Struct.Fields,
|
||||||
>(
|
>(
|
||||||
tag: Tag,
|
tag: Tag,
|
||||||
fieldsOr: Fields | HasFields<Fields>,
|
fieldsOr: Fields | HasFields<Fields>,
|
||||||
annotations?: S.Annotations.Schema<Self>,
|
annotations?: Schema.Annotations.Schema<Self>,
|
||||||
) => S.TaggedClass<
|
) => Schema.TaggedClass<
|
||||||
Self,
|
Self,
|
||||||
Tag,
|
Tag,
|
||||||
{ readonly _tag: S.PropertySignature<":", Tag, never, ":", Tag, true, never> } & Fields
|
{ readonly _tag: Schema.PropertySignature<":", Tag, never, ":", Tag, true, never> } & Fields
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user