Work
This commit is contained in:
@@ -2,7 +2,7 @@ import type { Annotations, Class, Struct } from "@effect/schema/Schema"
|
||||
import type { Mutable } from "effect/Types"
|
||||
import type { Constructor } from "type-fest"
|
||||
import type { StaticType } from "../../.."
|
||||
import type { HasFields, MissingSelfGeneric } from "./util"
|
||||
import type { HasFields } from "./util"
|
||||
|
||||
|
||||
export type TMutableClass<
|
||||
@@ -26,19 +26,17 @@ export type TMutableClass<
|
||||
StaticType<Class<Self, Fields, I, R, C, Inherited, Proto>>,
|
||||
"extend"
|
||||
> & {
|
||||
extend<Extended = never>(identifier: string): <newFields extends Struct.Fields>(
|
||||
extend<Extended>(identifier: string): <newFields extends Struct.Fields>(
|
||||
fields: newFields | HasFields<newFields>,
|
||||
annotations?: Annotations.Schema<Extended>,
|
||||
) => [Extended] extends [never]
|
||||
? MissingSelfGeneric<"Base.extend">
|
||||
: TMutableClass<
|
||||
Extended,
|
||||
Fields & newFields,
|
||||
I & Struct.Encoded<newFields>,
|
||||
R | Struct.Context<newFields>,
|
||||
C & Struct.Constructor<newFields>,
|
||||
Self,
|
||||
Proto
|
||||
>
|
||||
) => TMutableClass<
|
||||
Extended,
|
||||
Fields & newFields,
|
||||
I & Struct.Encoded<newFields>,
|
||||
R | Struct.Context<newFields>,
|
||||
C & Struct.Constructor<newFields>,
|
||||
Self,
|
||||
Proto
|
||||
>
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user