MCPcopy Index your code
hub / github.com/Effect-TS/effect / effectifyDecode

Function effectifyDecode

packages/effect/test/Schema/TestUtils.ts:76–91  ·  view source on GitHub ↗
(
  decode: (
    fromA: any,
    options: AST.ParseOptions,
    self: AST.Transformation,
    fromI: any
  ) => Effect.Effect<any, ParseResult.ParseIssue, R>
)

Source from the content-addressed store, hash-verified

74})
75
76function effectifyDecode<R>(
77 decode: (
78 fromA: any,
79 options: AST.ParseOptions,
80 self: AST.Transformation,
81 fromI: any
82 ) => Effect.Effect<any, ParseResult.ParseIssue, R>
83): (
84 fromA: any,
85 options: AST.ParseOptions,
86 self: AST.Transformation,
87 fromI: any
88) => Effect.Effect<any, ParseResult.ParseIssue, R> {
89 return (fromA, options, ast, fromI) =>
90 ParseResult.flatMap(Effect.sleep("10 millis"), () => decode(fromA, options, ast, fromI))
91}
92
93function effectifyAST(ast: AST.AST): AST.AST {
94 switch (ast._tag) {

Callers 1

effectifyASTFunction · 0.85

Calls 2

sleepMethod · 0.65
decodeFunction · 0.50

Tested by

no test coverage detected