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

Function empty

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

Source from the content-addressed store, hash-verified

260 * @since 2.0.0
261 */
262export const empty = <K, V>(): Effect.Effect<TxHashMap<K, V>> =>
263 Effect.gen(function*() {
264 const ref = yield* TxRef.make(HashMap.empty<K, V>())
265 return Object.assign(Object.create(TxHashMapProto), { ref })
266 })
267
268/**
269 * 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