[]previous and next page

isFailure (@shadow-js/dusk/client)

True for a value fail made (or one that has its shape, after the wire). (isFailure of @shadow-js/dusk/client)

True for a value fail made (or one that has its shape, after the wire).

Import#

ts
import { isFailure } from "@shadow-js/dusk/client";

Signature#

ts
function isFailure(value: unknown): value is ActionFailure

Parameters#

Name Description
value Anything a server function returned.

Returns#

true for a failure.

Examples#

ts
if (isFailure(result)) showProblems(result.data);