import type { Param } from '@traversable/registry' import type { LowerBound } from './schema.js' export function clone(schema: S): S export function clone(schema: S) { function cloned(u: Param) { return schema(u) } for (const k in schema) (cloned as typeof schema)[k] = schema[k] return cloned } // export function extend(): (schema: S, extension: Partial) => Ext // export function extend() { // return (schema: S, extension: Ext) => { // function cloned(u: Param) { return schema(u) } // for (const k in schema) (cloned as S)[k] = schema[k] // for (const k in extension) (cloned as Ext)[k] = extension[k] // return cloned // } // }