MCPcopy Create free account
hub / github.com/effect-app/libs / preserveCopyAndMethods

Function preserveCopyAndMethods

packages/effect-app/src/Schema.ts:178–190  ·  view source on GitHub ↗
(schema: any)

Source from the content-addressed store, hash-verified

176 const origAnnotateKey: any = result.annotateKey
177
178 const preserveCopyAndMethods = (schema: any): any => {
179 schema.copy = copy
180 schema.mapFields = function(this: any, f: any, options?: any) {
181 return (result as any).mapFields.call(this, f, options)
182 }
183 schema.annotate = function(this: any, annotations?: any) {
184 return (result as any).annotate.call(this, annotations)
185 }
186 schema.annotateKey = function(this: any, annotations?: any) {
187 return (result as any).annotateKey.call(this, annotations)
188 }
189 return allowVoidMake(schema)
190 }
191 ;(result as any).mapFields = function(this: any, f: any, options?: any) {
192 // eslint-disable-next-line @typescript-eslint/no-unsafe-call
193 const mapped = origMapFields.call(this, f, options).annotate(concurrencyUnbounded)

Callers 1

StructFunction · 0.85

Calls 1

allowVoidMakeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…