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

Function mapElements

packages/effect/src/Schema.ts:4370–4379  ·  view source on GitHub ↗
(
      this: Tuple<Elements>,
      f: (elements: Elements) => To,
      options?: {
        readonly unsafePreserveChecks?: boolean | undefined
      } | undefined
    )

Source from the content-addressed store, hash-verified

4368 return make(ast, {
4369 elements,
4370 mapElements<To extends Tuple.Elements>(
4371 this: Tuple<Elements>,
4372 f: (elements: Elements) => To,
4373 options?: {
4374 readonly unsafePreserveChecks?: boolean | undefined
4375 } | undefined
4376 ): Tuple<Simplify<Readonly<To>>> {
4377 const elements = f(this.elements)
4378 return makeTuple(SchemaAST.tuple(elements, options?.unsafePreserveChecks ? this.ast.checks : undefined), elements)
4379 }
4380 })
4381}
4382

Callers

nothing calls this directly

Calls 2

makeTupleFunction · 0.85
fFunction · 0.50

Tested by

no test coverage detected