({ key, value }: {
readonly key: K
readonly value: V
})
| 7680 | * @since 3.10.0 |
| 7681 | */ |
| 7682 | export function ReadonlyMap<K extends Schema.Any, V extends Schema.Any>({ key, value }: { |
| 7683 | readonly key: K |
| 7684 | readonly value: V |
| 7685 | }): ReadonlyMap$<K, V> { |
| 7686 | return transform( |
| 7687 | Array$(Tuple(key, value)), |
| 7688 | ReadonlyMapFromSelf({ key: typeSchema(asSchema(key)), value: typeSchema(asSchema(value)) }), |
| 7689 | { |
| 7690 | strict: true, |
| 7691 | decode: (i) => new Map(i), |
| 7692 | encode: (a) => Array.from(a.entries()) |
| 7693 | } |
| 7694 | ) |
| 7695 | } |
| 7696 | |
| 7697 | /** |
| 7698 | * @category api interface |
nothing calls this directly
no test coverage detected
searching dependent graphs…