import { Schema } from "@effect/schema" import type { Types } from "effect" import type { StaticType } from "../../../StaticType" import type { HasFields } from "./util" export interface MutableClass< Self, Fields extends Schema.Struct.Fields, I, R, C, Inherited, Proto, > extends Omit< StaticType>, "extend" > { new( ...args: ConstructorParameters> ): Omit< InstanceType>, keyof Fields > & Types.Mutable> extend(identifier: string): ( fields: newFields | HasFields, annotations?: Schema.Annotations.Schema, ) => MutableClass< Extended, Fields & newFields, I & Schema.Struct.Encoded, R | Schema.Struct.Context, C & Schema.Struct.Constructor, Self, Proto > } interface MutableInput< Self, Fields extends Schema.Struct.Fields, I, R, C, Inherited, Proto > extends StaticType> { new( props: any, options?: any, ): Schema.Struct.Type & Omit & Proto } export const Mutable = < Self, Fields extends Schema.Struct.Fields, I, R, C, Inherited, Proto >( self: MutableInput ) => self as MutableClass