function / @typed/fx

RefHashMap.make

Creates a new RefHashMap from a HashMap, Effect, or Fx.

Package version
2.0.0-beta.13
Category
Constructors
Since
1.18.0
Member of
RefHashMap

Import

import { RefHashMap } from "@typed/fx";

Access RefHashMap.make through the imported RefHashMap export. Its declaration below describes the member.

This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.

Signatures

export declare function make<K, V, E = never, R = never>(initial: HashMap.HashMap<K, V> | Effect.Effect<HashMap.HashMap<K, V>, E, R> | Fx.Fx<HashMap.HashMap<K, V>, E, R>): Effect.Effect<RefHashMap<K, V, E>, never, R | Scope.Scope>;

Why

Creates hash map state with equality suited to that Effect data type, so unchanged values do not produce redundant pushed updates.

Ownership and lifetime

The creation Effect requires Scope. It owns initializer acquisition, live source subscriptions, and cleanup; source failures and services stay on reads and pushes.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source