@internal
| 98 | |
| 99 | /** @internal */ |
| 100 | class Composite implements FiberId.Composite { |
| 101 | readonly [FiberIdTypeId]: FiberId.FiberIdTypeId = FiberIdTypeId |
| 102 | readonly _tag = OP_COMPOSITE |
| 103 | constructor( |
| 104 | readonly left: FiberId.FiberId, |
| 105 | readonly right: FiberId.FiberId |
| 106 | ) { |
| 107 | } |
| 108 | _hash: number | undefined; |
| 109 | [Hash.symbol](): number { |
| 110 | return pipe( |
| 111 | Hash.string(`${FiberIdSymbolKey}-${this._tag}`), |
| 112 | Hash.combine(Hash.hash(this.left)), |
| 113 | Hash.combine(Hash.hash(this.right)), |
| 114 | Hash.cached(this) |
| 115 | ) |
| 116 | } |
| 117 | [Equal.symbol](that: unknown): boolean { |
| 118 | return isFiberId(that) && |
| 119 | that._tag === OP_COMPOSITE && |
| 120 | Equal.equals(this.left, that.left) && |
| 121 | Equal.equals(this.right, that.right) |
| 122 | } |
| 123 | toString() { |
| 124 | return format(this.toJSON()) |
| 125 | } |
| 126 | toJSON() { |
| 127 | return { |
| 128 | _id: "FiberId", |
| 129 | _tag: this._tag, |
| 130 | left: toJSON(this.left), |
| 131 | right: toJSON(this.right) |
| 132 | } |
| 133 | } |
| 134 | [NodeInspectSymbol]() { |
| 135 | return this.toJSON() |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | /** @internal */ |
| 140 | export const none: FiberId.None = new None() |
nothing calls this directly
no outgoing calls
no test coverage detected