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

Function NonEmptyChunk

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

Source from the content-addressed store, hash-verified

8377 * @since 3.10.0
8378 */
8379export function NonEmptyChunk<Value extends Schema.Any>(value: Value): NonEmptyChunk<Value> {
8380 return transform(
8381 NonEmptyArray(value),
8382 NonEmptyChunkFromSelf(typeSchema(asSchema(value))),
8383 {
8384 strict: true,
8385 decode: (i) => chunk_.unsafeFromNonEmptyArray(i),
8386 encode: (a) => chunk_.toReadonlyArray(a)
8387 }
8388 )
8389}
8390
8391const decodeData = <A extends Readonly<Record<string, unknown>> | ReadonlyArray<unknown>>(a: A): A =>
8392 Array.isArray(a) ? data_.array(a) : data_.struct(a)

Callers

nothing calls this directly

Calls 5

typeSchemaFunction · 0.85
asSchemaFunction · 0.85
transformInterface · 0.70
NonEmptyArrayFunction · 0.70
NonEmptyChunkFromSelfFunction · 0.70

Tested by

no test coverage detected