0.1.21 #21

Merged
Thilawyn merged 23 commits from next into master 2024-05-12 01:11:51 +02:00
Showing only changes of commit 2ae5260386 - Show all commits

View File

@@ -1,8 +1,14 @@
import { Schema as S } from "@effect/schema"
import { Simplify } from "type-fest"
import { AbstractClass, AbstractConstructor, Simplify } from "type-fest"
import { Trait, TraitTuple } from "../Trait"
import { StaticImplements, TraitExpressionLike } from "../TraitExpression"
import { Extend } from "../util"
import { Extend, StaticMembers } from "../util"
import { Types } from "effect"
type RequiredKeys<T> = {
[K in keyof T]-?: {} extends Pick<T, K> ? never : K
}[keyof T]
export class EffectSchemaTraitExpression<
@@ -26,6 +32,18 @@ implements TraitExpressionLike<
extends<Self>(): (
AbstractConstructor<
S.Struct.Type<Fields> &
Omit<Inherited, keyof Fields> &
Proto,
[
props: RequiredKeys<C> extends never ? void | {} : Types.Simplify<C>,
disableValidation?: boolean | undefined
]
> &
StaticMembers<
S.Class<
Self,
Fields,
@@ -37,6 +55,7 @@ implements TraitExpressionLike<
]>
>,
Proto
>
> &
Simplify<