Skip to content

Commit

Permalink
fix(types): button action functions return promises
Browse files Browse the repository at this point in the history
  • Loading branch information
gregjopa committed Mar 21, 2021
1 parent f2b93b3 commit aeac03f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions types/components/buttons.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,15 @@ export type CreateSubscriptionActions = {
};

export type OnInitActions = {
enable: () => void;
disable: () => void;
enable: () => Promise<void>;
disable: () => Promise<void>;
};

export type OnClickActions = {
reject: () => void;
resolve: () => void;
reject: () => Promise<void>;
resolve: () => Promise<void>;
};

// todo: what else is possible here?
export type OnApproveOrderActions = {
order: {
capture: () => Promise<CaptureOrderResponseBody>;
Expand Down

0 comments on commit aeac03f

Please sign in to comment.