(self: Duration): booleanChecks whether a Duration is finite (not infinite).
Example (Checking finite durations)
import { Duration } from "effect"
console.log(Duration.isFinite(Duration.seconds(5))) // true
console.log(Duration.isFinite(Duration.infinity)) // falseguards
Source effect/Duration.ts:4302 lines
export const const isFinite: (
self: Duration
) => boolean
Checks whether a Duration is finite (not infinite).
Example (Checking finite durations)
import { Duration } from "effect"
console.log(Duration.isFinite(Duration.seconds(5))) // true
console.log(Duration.isFinite(Duration.infinity)) // false
isFinite = (self: Duration(parameter) self: {
value: DurationValue;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
self: Duration): boolean =>
self: Duration(parameter) self: {
value: DurationValue;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
self.Duration.value: DurationValuevalue._tag: | "Millis"
| "Nanos"
| "Infinity"
| "NegativeInfinity"
_tag !== "Infinity" && self: Duration(parameter) self: {
value: DurationValue;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
self.Duration.value: DurationValuevalue._tag: "Millis" | "Nanos" | "NegativeInfinity"_tag !== "NegativeInfinity"Referenced by 7 symbols