@internal
| 65 | |
| 66 | /** @internal */ |
| 67 | class Runtime implements FiberId.Runtime { |
| 68 | readonly [FiberIdTypeId]: FiberId.FiberIdTypeId = FiberIdTypeId |
| 69 | readonly _tag = OP_RUNTIME |
| 70 | constructor( |
| 71 | readonly id: number, |
| 72 | readonly startTimeMillis: number |
| 73 | ) {} |
| 74 | [Hash.symbol](): number { |
| 75 | return Hash.cached(this, Hash.string(`${FiberIdSymbolKey}-${this._tag}-${this.id}-${this.startTimeMillis}`)) |
| 76 | } |
| 77 | [Equal.symbol](that: unknown): boolean { |
| 78 | return isFiberId(that) && |
| 79 | that._tag === OP_RUNTIME && |
| 80 | this.id === that.id && |
| 81 | this.startTimeMillis === that.startTimeMillis |
| 82 | } |
| 83 | toString() { |
| 84 | return format(this.toJSON()) |
| 85 | } |
| 86 | toJSON() { |
| 87 | return { |
| 88 | _id: "FiberId", |
| 89 | _tag: this._tag, |
| 90 | id: this.id, |
| 91 | startTimeMillis: this.startTimeMillis |
| 92 | } |
| 93 | } |
| 94 | [NodeInspectSymbol]() { |
| 95 | return this.toJSON() |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | /** @internal */ |
| 100 | class Composite implements FiberId.Composite { |
nothing calls this directly
no outgoing calls
no test coverage detected