@typed/io
Version:
Runtime IO type system
12 lines • 413 B
JavaScript
import * as G from '../guard';
import { Any, Type } from './Type';
export function map(key, value, name = `ReadonlyMap<${key.name}, ${value.name}>`, expected = `ReadonlyMap<${key.expected}, ${value.expected}>`) {
const type = Type.fromGuard(G.map(key, value), name, expected);
return {
...type,
key,
value,
};
}
export const Map = map(Any, Any);
//# sourceMappingURL=Map.js.map