This commit is contained in:
@@ -3,18 +3,16 @@ import type { Annotations, Struct } from "@effect/schema/Schema"
|
||||
import type { HasFields } from "./util"
|
||||
|
||||
|
||||
export function Class<Self>(identifier: string) {
|
||||
return <Fields extends Struct.Fields>(
|
||||
export const Class = S.Class as <Self>(identifier: string) =>
|
||||
<Fields extends Struct.Fields>(
|
||||
fieldsOr: Fields | HasFields<Fields>,
|
||||
annotations?: Annotations.Schema<Self>,
|
||||
) =>
|
||||
S.Class<Self>(identifier)(fieldsOr, annotations) as S.Class<
|
||||
Self,
|
||||
Fields,
|
||||
Struct.Encoded<Fields>,
|
||||
Struct.Context<Fields>,
|
||||
Struct.Constructor<Fields>,
|
||||
{},
|
||||
{}
|
||||
>
|
||||
}
|
||||
) => S.Class<
|
||||
Self,
|
||||
Fields,
|
||||
Struct.Encoded<Fields>,
|
||||
Struct.Context<Fields>,
|
||||
Struct.Constructor<Fields>,
|
||||
{},
|
||||
{}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user