MCPcopy Create free account
hub / github.com/Effect-TS/effect / fromKey

Function fromKey

packages/effect/src/ui/Query.ts:3672–3684  ·  view source on GitHub ↗
(
    key: string,
    options: SchemaAST.ParseOptions
  )

Source from the content-addressed store, hash-verified

3670 }
3671 })
3672 const fromKey = (
3673 key: string,
3674 options: SchemaAST.ParseOptions
3675 ): Effect.Effect<unknown, SchemaIssue.Issue> => {
3676 let parsed: unknown
3677 try {
3678 parsed = JSON.parse(key)
3679 } catch {
3680 return Effect.fail(invalid("the args key isn't JSON"))
3681 }
3682 // The declaration checks the key once the args are decoded all the way.
3683 return decodeArgs(parsed, options)
3684 }
3685 // The log's form adds what page state drops: whether a fetch is in flight, and a list's exact more.
3686 const transient = Schema.Tuple([
3687 Schema.Boolean,

Callers 1

decodeStateFunction · 0.85

Calls 3

invalidFunction · 0.70
failMethod · 0.65
parseMethod · 0.45

Tested by

no test coverage detected