Function
decodeFromCursor
(
ast: SchemaAST.AST,
decode: (cursor: ConfigCursor) => Effect.Effect<unknown, SchemaIssue.Issue>
)
Source from the content-addressed store, hash-verified
| 684 | const getScalar = (node: ConfigProvider.Node | undefined): string | undefined => node?.value |
| 685 | |
| 686 | const decodeFromCursor = ( |
| 687 | ast: SchemaAST.AST, |
| 688 | decode: (cursor: ConfigCursor) => Effect.Effect<unknown, SchemaIssue.Issue> |
| 689 | ): SchemaAST.AST => |
| 690 | SchemaAST.decodeTo( |
| 691 | SchemaAST.unknown, |
| 692 | ast, |
| 693 | new SchemaTransformation.Transformation( |
| 694 | SchemaGetter.transformOrFail((input: unknown) => decode(input as ConfigCursor)), |
| 695 | SchemaGetter.passthrough() |
| 696 | ) |
| 697 | ) |
| 698 | |
| 699 | const isScalarInput = (ast: SchemaAST.AST): boolean => { |
| 700 | switch (ast._tag) { |
Tested by
no test coverage detected