Hyperlinkv0.8.0-beta.28

TxChunk

TxChunk.makeUnsafeconsteffect/TxChunk.ts:219
<A>(ref: TxRef.TxRef<Chunk.Chunk<A>>): TxChunk<A>

Creates a new TxChunk with the specified TxRef.

Details

This function returns a new TxChunk reference wrapping the provided TxRef. No existing TxChunk instances are modified.

Example (Wrapping an existing TxRef)

import { Chunk, TxChunk, TxRef } from "effect"

// Create a TxChunk from an existing TxRef (advanced usage)
const ref = TxRef.makeUnsafe(Chunk.fromIterable([1, 2, 3]))
const txChunk = TxChunk.makeUnsafe(ref)
constructors
Source effect/TxChunk.ts:2196 lines
export const makeUnsafe = <A>(ref: TxRef.TxRef<Chunk.Chunk<A>>): TxChunk<A> => {
  const txChunk = Object.create(TxChunkProto)
  txChunk[TypeId] = TypeId
  txChunk.ref = ref
  return txChunk
}
Referenced by 3 symbols