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

Function nonEmptyChunkParse

packages/effect/src/Schema.ts:8338–8344  ·  view source on GitHub ↗
(
  decodeUnknown: ParseResult.DecodeUnknown<array_.NonEmptyReadonlyArray<A>, R>
)

Source from the content-addressed store, hash-verified

8336 `NonEmptyChunk(${chunk_.toReadonlyArray(c).map(item).join(", ")})`
8337
8338const nonEmptyChunkParse = <A, R>(
8339 decodeUnknown: ParseResult.DecodeUnknown<array_.NonEmptyReadonlyArray<A>, R>
8340): ParseResult.DeclarationDecodeUnknown<chunk_.NonEmptyChunk<A>, R> =>
8341(u, options, ast) =>
8342 chunk_.isChunk(u) && chunk_.isNonEmpty(u)
8343 ? toComposite(decodeUnknown(chunk_.toReadonlyArray(u), options), chunk_.unsafeFromNonEmptyArray, ast, u)
8344 : ParseResult.fail(new ParseResult.Type(ast, u))
8345
8346/**
8347 * @category Chunk

Callers 1

NonEmptyChunkFromSelfFunction · 0.85

Calls 3

toCompositeFunction · 0.85
decodeUnknownFunction · 0.70
failMethod · 0.65

Tested by

no test coverage detected