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

Function make

packages/effect/src/TxHashMap.ts:294–301  ·  view source on GitHub ↗
(
  ...entries: Array<readonly [K, V]>
)

Source from the content-addressed store, hash-verified

292 * @since 2.0.0
293 */
294export const make = <K, V>(
295 ...entries: Array<readonly [K, V]>
296): Effect.Effect<TxHashMap<K, V>> =>
297 Effect.gen(function*() {
298 const hashMap = HashMap.make(...entries)
299 const ref = yield* TxRef.make(hashMap)
300 return Object.assign(Object.create(TxHashMapProto), { ref })
301 })
302
303/**
304 * Creates a TxHashMap from an iterable of key-value pairs.

Callers

nothing calls this directly

Calls 2

assignMethod · 0.80
makeMethod · 0.65

Tested by

no test coverage detected