0.1.6 #7

Merged
Thilawyn merged 10 commits from next into master 2024-07-29 18:42:05 +02:00
2 changed files with 14 additions and 14 deletions
Showing only changes of commit b6c5f728ae - Show all commits

View File

@@ -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>,
{},
{}
>

View File

@@ -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
>