MCPcopy Index your code
hub / github.com/Effect-TS/effect / Chunk

Function Chunk

packages/effect/src/Schema.ts:8307–8317  ·  view source on GitHub ↗
(value: Value)

Source from the content-addressed store, hash-verified

8305 * @since 3.10.0
8306 */
8307export function Chunk<Value extends Schema.Any>(value: Value): Chunk<Value> {
8308 return transform(
8309 Array$(value),
8310 ChunkFromSelf(typeSchema(asSchema(value))),
8311 {
8312 strict: true,
8313 decode: (i) => i.length === 0 ? chunk_.empty() : chunk_.fromIterable(i),
8314 encode: (a) => chunk_.toReadonlyArray(a)
8315 }
8316 )
8317}
8318
8319/**
8320 * @category api interface

Callers

nothing calls this directly

Calls 5

typeSchemaFunction · 0.85
asSchemaFunction · 0.85
transformInterface · 0.70
Array$Function · 0.70
ChunkFromSelfFunction · 0.70

Tested by

no test coverage detected