MCPcopy Create free account
hub / github.com/codemix/graph / fromMap

Method fromMap

packages/graph/src/TemporalTypes.ts:235–242  ·  view source on GitHub ↗

* Create a LocalTimeValue from a map of components.

(map: Record<string, unknown>)

Source from the content-addressed store, hash-verified

233 * Create a LocalTimeValue from a map of components.
234 */
235 public static fromMap(map: Record<string, unknown>): LocalTimeValue | null {
236 const hour = typeof map.hour === "number" ? map.hour : 0;
237 const minute = typeof map.minute === "number" ? map.minute : 0;
238 const second = typeof map.second === "number" ? map.second : 0;
239 const nanosecond = typeof map.nanosecond === "number" ? map.nanosecond : 0;
240
241 return new LocalTimeValue(hour, minute, second, nanosecond);
242 }
243
244 public get hour(): number {
245 return this.#hour;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected