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

Function toString

packages/effect/src/Duration.ts:370–381  ·  view source on GitHub ↗
(this: Duration)

Source from the content-addressed store, hash-verified

368 return isDuration(that) && equals(this, that)
369 },
370 toString(this: Duration) {
371 switch (this.value._tag) {
372 case "Infinity":
373 return "Infinity"
374 case "NegativeInfinity":
375 return "-Infinity"
376 case "Nanos":
377 return `${this.value.nanos} nanos`
378 case "Millis":
379 return `${this.value.millis} millis`
380 }
381 },
382 toJSON(this: Duration) {
383 switch (this.value._tag) {
384 case "Millis":

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected