Skip to content

Commit

Permalink
flow: Specify return type for constructActionSheetButtons
Browse files Browse the repository at this point in the history
This function being exported, now requires return type to be
specified.
  • Loading branch information
borisyankov committed Sep 15, 2018
1 parent 708b42d commit 7bff19a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lightbox/LightboxActionSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ const actionSheetButtons: ButtonType[] = [
{ title: 'Cancel', onPress: () => false },
];

export const constructActionSheetButtons = () => actionSheetButtons.map(button => button.title);
export const constructActionSheetButtons = (): string[] =>
actionSheetButtons.map(button => button.title);

export const executeActionSheetAction = ({ title, ...props }: ExecuteActionSheetActionType) => {
const button = actionSheetButtons.find(x => x.title === title);
Expand Down

0 comments on commit 7bff19a

Please sign in to comment.