Issue with Schema Mutability in TypeScript Code

Schema mutablity not working
it seems even i added Schema.mutable ad start still resulting to readonly not sure what to do

export const UpdateNodeSchema = Schema.Union(
    Schema.mutable(
        Schema.extend(
            PlanetNodeDataSchema.pick('type', 'id'),
            Schema.partial(
                Schema.Struct({
                    ...PlanetNodeDataSchema.omit('id', 'type', 'galaxy').fields,
                    node_data: Schema.Struct({
                        ...PlanetNodeDataSchema.fields.node_data.omit('image').fields,
                        image: Schema.String
                    })
                })
            )
        )
    ),
    Schema.extend(
        BlackHoleNodeDataSchema.pick('type'),
        Schema.partial(
            Schema.Struct({
                ...BlackHoleNodeDataSchema.omit('id', 'type', 'galaxy').fields,
                node_data: Schema.Struct({
                    ...BlackHoleNodeDataSchema.fields.node_data.fields,
                    image: Schema.String
                })
            })
        )
    )
);
image.png
image.png
Was this page helpful?