* Create a TimeValue from a map of components.
(map: Record<string, unknown>)
| 377 | * Create a TimeValue from a map of components. |
| 378 | */ |
| 379 | public static fromMap(map: Record<string, unknown>): TimeValue | null { |
| 380 | const hour = typeof map.hour === "number" ? map.hour : 0; |
| 381 | const minute = typeof map.minute === "number" ? map.minute : 0; |
| 382 | const second = typeof map.second === "number" ? map.second : 0; |
| 383 | const nanosecond = typeof map.nanosecond === "number" ? map.nanosecond : 0; |
| 384 | const offsetSeconds = typeof map.offset === "number" ? map.offset : 0; |
| 385 | |
| 386 | return new TimeValue(hour, minute, second, nanosecond, offsetSeconds); |
| 387 | } |
| 388 | |
| 389 | public get hour(): number { |
| 390 | return this.#hour; |
nothing calls this directly
no outgoing calls
no test coverage detected