MCPcopy Create free account
hub / github.com/Effect-TS/effect / mapFields

Method mapFields

packages/effect/src/Schema.ts:14008–14008  ·  view source on GitHub ↗

* Returns a new struct with the fields modified by the provided function. * * **Details** * * Options: * * - `unsafePreserveChecks` - if `true`, keep any `.check(...)` constraints * that were attached to the original struct. Defaults to `false`. * * **Warning**: This i

(
    f: (fields: S["fields"]) => To,
    options?: {
      readonly unsafePreserveChecks?: boolean | undefined
    } | undefined
  )

Source from the content-addressed store, hash-verified

14006 * after the transformation.
14007 */
14008 mapFields<To extends Struct.Fields>(
14009 f: (fields: S["fields"]) => To,
14010 options?: {
14011 readonly unsafePreserveChecks?: boolean | undefined

Callers 5

Schema.tst.tsFile · 0.65
Struct.tst.tsFile · 0.65
Schema.test.tsFile · 0.65
fieldsAssignFunction · 0.65
mapFieldsMethod · 0.65

Calls

no outgoing calls

Tested by

no test coverage detected