Skip to content

Commit b3b3863

Browse files
committed
Make action response and error non-optional
Updated ActionResponse type to make `response` and `error` fields mandatory but allowing null values. This change enforces more explicit handling of action outcomes and errors by avoiding optionality and using null to indicate absence. These typings changes improve type safety and clarity of action results handling in the codebase.
1 parent 7b83bee commit b3b3863

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/desktop/src/lib/actions/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ export class ButlerAction {
7777
/** A GitBulter Oplog snapshot ID after the action was performed. */
7878
snapshotAfter!: string;
7979
/** The outcome of the action, if it was successful. */
80-
response?: Outcome;
80+
response!: Outcome | null;
8181
/** An error message if the action failed. */
82-
error?: string;
82+
error!: string | null;
8383
/** The source of the action, if known. */
8484
source!: ActionSource;
8585
}

0 commit comments

Comments
 (0)