(decoding: boolean)
| 3970 | u[SnapshotMapTypeId].def.name === def.name && |
| 3971 | u[SnapshotMapTypeId].label === label |
| 3972 | const makeRun = (decoding: boolean) => (typeParameters: ReadonlyArray<SchemaAST.AST>) => { |
| 3973 | const one = snapshotRun(def, label, decoding)(typeParameters) |
| 3974 | return ( |
| 3975 | input: unknown, |
| 3976 | ast: SchemaAST.Declaration, |
| 3977 | options: SchemaAST.ParseOptions |
| 3978 | ): Effect.Effect<SnapshotMapImpl, SchemaIssue.Issue> => { |
| 3979 | if (!is(input)) { |
| 3980 | return Effect.fail(new SchemaIssue.InvalidType(ast, input, options)) |
| 3981 | } |
| 3982 | return Effect.map( |
| 3983 | Effect.forEach( |
| 3984 | input[SnapshotMapTypeId].entries.values(), |
| 3985 | (snapshot) => one(snapshot, ast, options) |
| 3986 | ), |
| 3987 | (snapshots) => makeSnapshotMap(def, label, snapshots) |
| 3988 | ) |
| 3989 | } |
| 3990 | } |
| 3991 | const toCodecJson = (typeParameters: ReadonlyArray<Schema.Top>) => { |
| 3992 | const wire = snapshotWire(def, label, typeParameters, log) |
| 3993 | return Schema.link<SnapshotMapImpl>()( |
no test coverage detected