@ignore
({ key, value }: {
readonly key: K
readonly value: V
})
| 7704 | |
| 7705 | /** @ignore */ |
| 7706 | function map<K extends Schema.Any, V extends Schema.Any>({ key, value }: { |
| 7707 | readonly key: K |
| 7708 | readonly value: V |
| 7709 | }): Map$<K, V> { |
| 7710 | return transform( |
| 7711 | Array$(Tuple(key, value)), |
| 7712 | MapFromSelf({ key: typeSchema(asSchema(key)), value: typeSchema(asSchema(value)) }), |
| 7713 | { |
| 7714 | strict: true, |
| 7715 | decode: (i) => new Map(i), |
| 7716 | encode: (a) => Array.from(a.entries()) |
| 7717 | } |
| 7718 | ) |
| 7719 | } |
| 7720 | |
| 7721 | export { |
| 7722 | /** |
no test coverage detected