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"
|
||||
|
||||
|
||||
export const Class = S.Class as <Self>(identifier: string) =>
|
||||
<Fields extends S.Struct.Fields>(
|
||||
export const Class = Schema.Class as <Self>(identifier: string) =>
|
||||
<Fields extends Schema.Struct.Fields>(
|
||||
fieldsOr: Fields | HasFields<Fields>,
|
||||
annotations?: S.Annotations.Schema<Self>,
|
||||
) => S.Class<
|
||||
annotations?: Schema.Annotations.Schema<Self>,
|
||||
) => Schema.Class<
|
||||
Self,
|
||||
Fields,
|
||||
S.Struct.Encoded<Fields>,
|
||||
S.Struct.Context<Fields>,
|
||||
S.Struct.Constructor<Fields>,
|
||||
Schema.Struct.Encoded<Fields>,
|
||||
Schema.Struct.Context<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"
|
||||
|
||||
|
||||
export const TaggedClass = S.TaggedClass as <Self>(identifier?: string) =>
|
||||
export const TaggedClass = Schema.TaggedClass as <Self>(identifier?: string) =>
|
||||
<
|
||||
Tag extends string,
|
||||
Fields extends S.Struct.Fields,
|
||||
Fields extends Schema.Struct.Fields,
|
||||
>(
|
||||
tag: Tag,
|
||||
fieldsOr: Fields | HasFields<Fields>,
|
||||
annotations?: S.Annotations.Schema<Self>,
|
||||
) => S.TaggedClass<
|
||||
annotations?: Schema.Annotations.Schema<Self>,
|
||||
) => Schema.TaggedClass<
|
||||
Self,
|
||||
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