Skip to content

unwrapOr ​

unwrapOr ​

Returns the success value, or fallback when the result is a failure.

ts
function unwrapOr<TValue>(
	result: UnwrappableResult<TValue, unknown>,
	fallback: TValue,
): TValue

Parameters

Released under the MIT License.