Schema.transform(
Schema.hashMap({
key: Schema.string,
value: Schema.chunk(Schema.struct({ snip })),
}),
Schema.record(Schema.string, Schema.array(Schema.struct({ snip }}))),
flow(
HashMap.toEntries,
ReadonlyArray.map(
([key, value]) => [key, Chunk.toReadonlyArray(value)] as const,
),
Object.fromEntries,
),
() => HashMap.empty();,
{ strict: false },
)
Schema.transform(
Schema.hashMap({
key: Schema.string,
value: Schema.chunk(Schema.struct({ snip })),
}),
Schema.record(Schema.string, Schema.array(Schema.struct({ snip }}))),
flow(
HashMap.toEntries,
ReadonlyArray.map(
([key, value]) => [key, Chunk.toReadonlyArray(value)] as const,
),
Object.fromEntries,
),
() => HashMap.empty();,
{ strict: false },
)