(this: Duration)
| 351 | const DurationProto: Omit<Duration, "value"> = { |
| 352 | [TypeId]: TypeId, |
| 353 | [Hash.symbol](this: Duration) { |
| 354 | // Hash equal finite durations using the same canonical nanoseconds |
| 355 | // representation used by `equals`. |
| 356 | switch (this.value._tag) { |
| 357 | case "Millis": { |
| 358 | const nanos = this.value.millis * 1_000_000 |
| 359 | return Number.isFinite(nanos) ? Hash.hash(roundTiesAwayFromZero(nanos)) : Hash.number(this.value.millis) |
| 360 | } |
| 361 | case "Nanos": |
| 362 | return Hash.hash(this.value.nanos) |
| 363 | default: |
| 364 | return Hash.structure(this.value) |
| 365 | } |
| 366 | }, |
| 367 | [Equal.symbol](this: Duration, that: unknown): boolean { |
| 368 | return isDuration(that) && equals(this, that) |
| 369 | }, |
nothing calls this directly
no test coverage detected