Skip to content

ActionResult<T>

@blobs/sdk v0.1.0


@blobs/sdk / actions/types / ActionResult

Defined in: actions/types.ts:15

Outcome of executing, undoing, or redoing an Action.

Always returned from Action.execute, Action.undo, and Action.redo. Consumers should branch on ActionResult.success before reading ActionResult.data.

Type Parameters

T

T = unknown

Type of the value returned on success.

Properties

success

success: boolean

Defined in: actions/types.ts:17

true when the operation succeeded.


data?

optional data?: T

Defined in: actions/types.ts:19

Result value, present on success.


error?

optional error?: string

Defined in: actions/types.ts:21

Failure reason, present on failure.


message?

optional message?: string

Defined in: actions/types.ts:23

Optional message to display to user.