Skip to content

Commit

Permalink
Allow Step to return null
Browse files Browse the repository at this point in the history
  • Loading branch information
vrde committed Dec 5, 2023
1 parent 16191fe commit cc7a743
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/internal/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,13 @@ export type Context = {};

export type ContractContext = Context & NeokingdomContracts;

export type Step<T extends Context> = (c: T) => Promise<TransactionResponse>;
export type Step<T extends Context> = (
c: T
) => Promise<TransactionResponse | null>;

export type StepWithExpandable<T extends Context> =
| ExpandableStep<T>
| ((c: T) => Promise<TransactionResponse>);
| ((c: T) => Promise<TransactionResponse | null>);

export type ExpandableStep<T extends Context> = {
expandableFunction: (c: T) => ProcessedSequence<T>;
Expand Down

0 comments on commit cc7a743

Please sign in to comment.