(value: Value)
| 8377 | * @since 3.10.0 |
| 8378 | */ |
| 8379 | export 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 | |
| 8391 | const decodeData = <A extends Readonly<Record<string, unknown>> | ReadonlyArray<unknown>>(a: A): A => |
| 8392 | Array.isArray(a) ? data_.array(a) : data_.struct(a) |
nothing calls this directly
no test coverage detected