0.1.21 #21
@@ -1,14 +1,8 @@
|
||||
import { Schema as S } from "@effect/schema"
|
||||
import { AbstractClass, AbstractConstructor, Simplify } from "type-fest"
|
||||
import { AbstractConstructor, Simplify } from "type-fest"
|
||||
import { Trait, TraitTuple } from "../Trait"
|
||||
import { StaticImplements, TraitExpressionLike } from "../TraitExpression"
|
||||
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<
|
||||
@@ -37,10 +31,7 @@ implements TraitExpressionLike<
|
||||
Omit<Inherited, keyof Fields> &
|
||||
Proto,
|
||||
|
||||
[
|
||||
props: RequiredKeys<C> extends never ? void | {} : Types.Simplify<C>,
|
||||
disableValidation?: boolean | undefined
|
||||
]
|
||||
ConstructorParameters<S.Class<unknown, Fields, I, R, C, Inherited, Proto>>
|
||||
> &
|
||||
|
||||
StaticMembers<
|
||||
|
||||
Reference in New Issue
Block a user