MCPcopy Create free account
hub / github.com/Effect-TS/effect / timeValue

Function timeValue

packages/sql/pg/src/PgTypes.ts:1095–1099  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

1093const MAX_TIME_MICROS = BigInt(MAX_TIME_MICROS_NUMBER)
1094
1095const timeValue = (value: unknown): bigint => {
1096 const micros = requireBigInt(value, "time")
1097 if (micros < ZERO || micros > MAX_TIME_MICROS) fail(`time out of range: ${micros}`)
1098 return micros
1099}
1100
1101/**
1102 * Microseconds since midnight, which always fit a `Number` exactly. Formatting

Callers 1

PgTypes.tsFile · 0.85

Calls 2

requireBigIntFunction · 0.85
failFunction · 0.70

Tested by

no test coverage detected