MCPcopy
hub / github.com/Effect-TS/effect / map

Function map

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

@ignore

({ key, value }: {
  readonly key: K
  readonly value: V
})

Source from the content-addressed store, hash-verified

7704
7705/** @ignore */
7706function map<K extends Schema.Any, V extends Schema.Any>({ key, value }: {
7707 readonly key: K
7708 readonly value: V
7709}): Map$<K, V> {
7710 return transform(
7711 Array$(Tuple(key, value)),
7712 MapFromSelf({ key: typeSchema(asSchema(key)), value: typeSchema(asSchema(value)) }),
7713 {
7714 strict: true,
7715 decode: (i) => new Map(i),
7716 encode: (a) => Array.from(a.entries())
7717 }
7718 )
7719}
7720
7721export {
7722 /**

Callers 15

getFinalTransformationFunction · 0.70
ParseResult.tsFile · 0.70
formatTypeMessageFunction · 0.70
formatTreeFunction · 0.70
getArrayFormatterIssuesFunction · 0.70
transposeOptionFunction · 0.70
Effect.tsFile · 0.70
getMethod · 0.70
getFunction · 0.70
Micro.tsFile · 0.70
asSomeFunction · 0.70
allFunction · 0.70

Calls 7

typeSchemaFunction · 0.85
asSchemaFunction · 0.85
entriesMethod · 0.80
transformInterface · 0.70
Array$Function · 0.70
TupleFunction · 0.70
MapFromSelfFunction · 0.70

Tested by

no test coverage detected