0.1.2 #3
@@ -1,14 +1,12 @@
|
|||||||
import { abstract, trait } from "@thilawyn/traitify-ts"
|
import { trait } from "@thilawyn/traitify-ts"
|
||||||
import { AbstractClass } from "type-fest"
|
import { AbstractClass } from "type-fest"
|
||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
import { ZodSchemaAbstractClass } from "../shapes/ZodSchemaClass"
|
import { ZodSchemaAbstractClass } from "../shapes/ZodSchemaClass"
|
||||||
import { Extend, StaticMembers } from "../util"
|
import { Extend, StaticMembers } from "../util"
|
||||||
|
|
||||||
|
|
||||||
export const ExtendableZodSchemaObject = trait(
|
export const ExtendableZodSchemaObject = trait
|
||||||
abstract(),
|
.implement(Super => class ExtendableZodSchemaObject extends Super {
|
||||||
|
|
||||||
Super => class ExtendableZodSchemaObject extends Super {
|
|
||||||
static extend<
|
static extend<
|
||||||
Super extends ZodSchemaAbstractClass<SuperInstance, SuperSchemaT, SuperSchemaUnknownKeys, SuperSchemaCatchall, SuperValues, SuperDefaultValues>,
|
Super extends ZodSchemaAbstractClass<SuperInstance, SuperSchemaT, SuperSchemaUnknownKeys, SuperSchemaCatchall, SuperValues, SuperDefaultValues>,
|
||||||
SuperInstance extends SuperValues,
|
SuperInstance extends SuperValues,
|
||||||
@@ -56,5 +54,5 @@ export const ExtendableZodSchemaObject = trait(
|
|||||||
static readonly defaultValues = defaultValues
|
static readonly defaultValues = defaultValues
|
||||||
} as any
|
} as any
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
)
|
.build()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { abstract, trait } from "@thilawyn/traitify-ts"
|
import { trait } from "@thilawyn/traitify-ts"
|
||||||
import { Effect, pipe } from "effect"
|
import { Effect, pipe } from "effect"
|
||||||
import { HasRequiredKeys } from "type-fest"
|
import { HasRequiredKeys } from "type-fest"
|
||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
@@ -26,10 +26,8 @@ type NewZodSchemaInstanceArgs<Input extends object> = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
export const InstantiableZodSchemaObject = trait(
|
export const InstantiableZodSchemaObject = trait
|
||||||
abstract(),
|
.implement(Super => class InstantiableZodSchemaObject extends Super {
|
||||||
|
|
||||||
Super => class InstantiableZodSchemaObject extends Super {
|
|
||||||
static create<
|
static create<
|
||||||
Instance extends Values,
|
Instance extends Values,
|
||||||
|
|
||||||
@@ -102,5 +100,5 @@ export const InstantiableZodSchemaObject = trait(
|
|||||||
protected static initialize() {
|
protected static initialize() {
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
)
|
.build()
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
import { abstract, trait } from "@thilawyn/traitify-ts"
|
import { trait } from "@thilawyn/traitify-ts"
|
||||||
|
|
||||||
|
|
||||||
export const ObservableZodSchemaObject = trait(
|
export const ObservableZodSchemaObject = trait
|
||||||
abstract(),
|
.implement(Super => class ObservableZodSchemaObject extends Super {
|
||||||
|
|
||||||
Super => class ObservableZodSchemaObject extends Super {
|
|
||||||
constructor(...args: any[]) {
|
constructor(...args: any[]) {
|
||||||
super(...args)
|
super(...args)
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
)
|
.build()
|
||||||
|
|||||||
Reference in New Issue
Block a user