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

Function make

packages/effect/src/TxSubscriptionRef.ts:120–129  ·  view source on GitHub ↗
(value: A)

Source from the content-addressed store, hash-verified

118 * @since 3.10.0
119 */
120export const make = <A>(value: A): Effect.Effect<TxSubscriptionRef<A>> =>
121 Effect.gen(function*() {
122 const ref = yield* TxRef.make(value)
123 const pubsub = yield* TxPubSub.unbounded<A>()
124 const self = Object.create(TxSubscriptionRefProto)
125 self[TypeId] = TypeId
126 self.ref = ref
127 self.pubsub = pubsub
128 return self
129 }).pipe(Effect.tx)
130
131// =============================================================================
132// Getters

Callers

nothing calls this directly

Calls 2

pipeMethod · 0.65
makeMethod · 0.65

Tested by

no test coverage detected