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

Function chunkParse

packages/effect/src/Schema.ts:8251–8259  ·  view source on GitHub ↗
(
  decodeUnknown: ParseResult.DecodeUnknown<ReadonlyArray<A>, R>
)

Source from the content-addressed store, hash-verified

8249 `Chunk(${chunk_.toReadonlyArray(c).map(item).join(", ")})`
8250
8251const chunkParse = <A, R>(
8252 decodeUnknown: ParseResult.DecodeUnknown<ReadonlyArray<A>, R>
8253): ParseResult.DeclarationDecodeUnknown<chunk_.Chunk<A>, R> =>
8254(u, options, ast) =>
8255 chunk_.isChunk(u) ?
8256 chunk_.isEmpty(u) ?
8257 ParseResult.succeed(chunk_.empty())
8258 : toComposite(decodeUnknown(chunk_.toReadonlyArray(u), options), chunk_.fromIterable, ast, u)
8259 : ParseResult.fail(new ParseResult.Type(ast, u))
8260
8261/**
8262 * @category api interface

Callers 1

ChunkFromSelfFunction · 0.85

Calls 4

toCompositeFunction · 0.85
decodeUnknownFunction · 0.70
isEmptyMethod · 0.65
failMethod · 0.65

Tested by

no test coverage detected