Conditionally coalesces a value based on a predicate guard. Returns the value (narrowed by the guard) if the guard returns true, otherwise returns the fallback.
The candidate value to test
A predicate or type guard function
Optional fallback value if the guard returns false
The value or fallback
Conditionally coalesces a value based on a predicate guard. Returns the value (narrowed by the guard) if the guard returns true, otherwise returns the fallback.
The value or fallback
Conditionally coalesces a value based on a predicate guard. Returns the value (narrowed by the guard) if the guard returns true, otherwise returns the fallback.