createTimeOrThrow
The createTimeOrThrow() function builds a TheTime from a TheTime, a numeric value, or a SpoolingTime. It throws CreateTheTimeError when the input is invalid.
Interactive example
Syntax
typescript
function createTimeOrThrow(
input: number | TheTime | SpoolingTime
): TheTimeParameters
input: A time value (number), aTheTime, or aSpoolingTime.
Return value
A valid TheTime. If the value is out of bounds or inconsistent, a CreateTheTimeError is thrown.
See also
createTime– Returns aMayBeTimeinstead of throwing.isSafeTimeValue– Checks numeric bounds.
