MCPcopy Create free account
hub / github.com/effect-app/libs / decodeJsonError

Function decodeJsonError

repos/effect/packages/effect/src/SchemaTransformation.ts:1016–1024  ·  view source on GitHub ↗
(input: JsonError)

Source from the content-addressed store, hash-verified

1014 * )
1015 * String(Schema.decodeSync(schema)(5n)) // => "5 nanos"
1016 * ```
1017 *
1018 * @see {@link durationFromMillis}
1019 *
1020 * @category transforming
1021 * @since 4.0.0
1022 */
1023export const durationFromNanos: Transformation<Duration.Duration, bigint> = transformOrFail({
1024 decode: (i) => Effect.succeed(Duration.nanos(i)),
1025 encode: (a, options) =>
1026 Option.match(Duration.toNanos(a), {
1027 onNone: () =>

Callers 1

decodeDefectFunction · 0.85

Calls 1

decodeDefectFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…