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

Function toJSON

packages/effect/src/Rational.ts:77–83  ·  view source on GitHub ↗
(this: Rational)

Source from the content-addressed store, hash-verified

75 return `Rational(${format(this)})`
76 },
77 toJSON(this: Rational) {
78 return {
79 _id: "Rational",
80 numerator: String(this.numerator),
81 denominator: String(this.denominator)
82 }
83 },
84 [NodeInspectSymbol](this: Rational) {
85 return this.toJSON()
86 },

Callers

nothing calls this directly

Calls 1

StringFunction · 0.70

Tested by

no test coverage detected