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

Method mapFields

repos/effect/packages/effect/src/Schema.ts:12413–12413  ·  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

12411 * Schema.encodeSync(schemaFromJsonString)({ a: 1 }) // => "{\n \"a\": 1\n}"
12412 * ```
12413 *
12414 * @category schemas
12415 * @since 4.0.0
12416 */

Callers 11

query.test.tsFile · 0.65
rawQuery.test.tsFile · 0.65
query.tsFile · 0.65
special.test.tsFile · 0.65
Class.tsFile · 0.65
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