<A = never>(): Array<A>Creates an empty array.
When to use
Use to create a typed empty array without allocating placeholder elements.
Example (Creating an empty array)
import { Array } from "effect"
const result = Array.empty<number>()
console.log(result) // []Source effect/Array.ts:33281 lines
export const const empty: <A = never>() => Array<A>Creates an empty array.
When to use
Use to create a typed empty array without allocating placeholder elements.
Example (Creating an empty array)
import { Array } from "effect"
const result = Array.empty<number>()
console.log(result) // []
empty: <function (type parameter) A in <A = never>(): Array<A>A = never>() => interface Array<T>Array<function (type parameter) A in <A = never>(): Array<A>A> = () => []Referenced by 20 symbols
Array.fromNullishOrQueue.collectSchemaAST.ObjectsScopedCache.entriesScopedCache.keysSink.collectSink.takeWhileSink.takeWhileEffectSink.takeWhileFilterSink.takeWhileFilterEffectStream.accumulateStream.groupAdjacentByStream.mapAccumStream.mapAccumEffectStream.rechunkStream.scanStream.splitStream.zipWithNextStream.zipWithPreviousStream.zipWithPreviousAndNext