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

Function empty

packages/effect/src/TxHashMap.ts:258–262  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

256 * @since 2.0.0
257 */
258export const empty = <K, V>(): Effect.Effect<TxHashMap<K, V>> =>
259 Effect.gen(function*() {
260 const ref = yield* TxRef.make(HashMap.empty<K, V>())
261 return Object.assign(Object.create(TxHashMapProto), { ref })
262 })
263
264/**
265 * Creates a TxHashMap from the provided key-value pairs.

Callers 1

TxHashMap.tsFile · 0.70

Calls 2

assignMethod · 0.80
makeMethod · 0.65

Tested by

no test coverage detected