(
args: unknown,
options: SchemaAST.ParseOptions
)
| 3657 | const decodeArgs = SchemaParser.decodeUnknownEffect(argsJson) |
| 3658 | // `args` here is the encoded side of the args Schema, so these see the args as the declaration passes them. |
| 3659 | const toKey = ( |
| 3660 | args: unknown, |
| 3661 | options: SchemaAST.ParseOptions |
| 3662 | ): Effect.Effect<string, SchemaIssue.Issue> => |
| 3663 | Effect.flatMap(encodeArgs(args, options), (encoded) => { |
| 3664 | try { |
| 3665 | return Effect.succeed(canonical(encoded)) |
| 3666 | } catch { |
| 3667 | return Effect.fail( |
| 3668 | invalid("the encoded args hold a value JSON can't carry") |
| 3669 | ) |
| 3670 | } |
| 3671 | }) |
| 3672 | const fromKey = ( |
| 3673 | key: string, |
| 3674 | options: SchemaAST.ParseOptions |
no test coverage detected