MCPcopy
hub / github.com/Effect-TS/effect / DurationFromSelf

Class DurationFromSelf

packages/effect/src/Schema.ts:5895–5909  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5893 * @since 3.10.0
5894 */
5895export class DurationFromSelf extends declare(
5896 duration_.isDuration,
5897 {
5898 typeConstructor: { _tag: "effect/Duration" },
5899 identifier: "DurationFromSelf",
5900 pretty: (): pretty_.Pretty<duration_.Duration> => String,
5901 arbitrary: (): LazyArbitrary<duration_.Duration> => (fc) =>
5902 fc.oneof(
5903 fc.constant(duration_.infinity),
5904 fc.bigInt({ min: 0n }).map((_) => duration_.nanos(_)),
5905 fc.maxSafeNat().map((_) => duration_.millis(_))
5906 ),
5907 equivalence: (): Equivalence.Equivalence<duration_.Duration> => duration_.Equivalence
5908 }
5909) {}
5910
5911/**
5912 * A schema that transforms a non negative `bigint` into a `Duration`. Treats

Callers

nothing calls this directly

Calls 2

declareInterface · 0.85
mapMethod · 0.65

Tested by

no test coverage detected