Function: isSuccess()
isSuccess<
R>(result):result is Extract<R, { type: "Success" }>
Type guard to check if a Result is a Success.
Type Parameters
R
R extends Result<unknown, unknown>
The type of the result to check.
Parameters
result
R
The Result to check.
Returns
result is Extract<R, { type: "Success" }>
true if the result is a Success, otherwise false.
