From 67c4b826f5f46730ade6b46649ab0e9fbb4ffe86 Mon Sep 17 00:00:00 2001 From: Daniel Ternyak Date: Mon, 24 Apr 2017 18:59:28 -0500 Subject: [PATCH] Add Flow types. --- common/actions/config.js | 12 +++++------- common/actions/generateWallet.js | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/common/actions/config.js b/common/actions/config.js index 933f8048..6c012794 100644 --- a/common/actions/config.js +++ b/common/actions/config.js @@ -1,24 +1,22 @@ +// @flow export const CONFIG_LANGUAGE_CHANGE = 'CONFIG_LANGUAGE_CHANGE'; export const CONFIG_LANGUAGE_DROPDOWN_TOGGLE = 'CONFIG_LANGUAGE_DROPDOWN_TOGGLE'; export const CONFIG_NODE_CHANGE = 'CONFIG_NODE_CHANGE'; export const CONFIG_NODE_DROPDOWN_TOGGLE = 'CONFIG_NODE_DROPDOWN_TOGGLE'; -export const CHANGE_LANGUAGE = (index) => ({ +export const CHANGE_LANGUAGE = (index: number) => Object({ type: CONFIG_LANGUAGE_CHANGE, index: index }) - -export const TOGGLE_LANGUAGE_DROPDOWN = () => ({ +export const TOGGLE_LANGUAGE_DROPDOWN = () => Object({ type: CONFIG_LANGUAGE_DROPDOWN_TOGGLE }) - -export const CHANGE_NODE = (index) => ({ +export const CHANGE_NODE = (index: number) => Object({ type: CONFIG_NODE_CHANGE, index: index }) - -export const TOGGLE_NODE_DROPDOWN = () => ({ +export const TOGGLE_NODE_DROPDOWN = () => Object({ type: CONFIG_NODE_DROPDOWN_TOGGLE }) \ No newline at end of file diff --git a/common/actions/generateWallet.js b/common/actions/generateWallet.js index 2695bd01..86acf86d 100644 --- a/common/actions/generateWallet.js +++ b/common/actions/generateWallet.js @@ -3,11 +3,11 @@ export const GENERATE_WALLET_FILE = 'GENERATE_WALLET_FILE' export const GENERATE_WALLET_FILE_CONFIRM = 'GENERATE_WALLET_FILE_CONFIRM' -export const SHOW_GENERATE_WALLET_PASSWORD_ACTION = () => ({ +export const SHOW_GENERATE_WALLET_PASSWORD_ACTION = () => Object ({ type: GENERATE_WALLET_SHOW_PASSWORD }) -export const GENERATE_WALLET_FILE_ACTION = () => ({ +export const GENERATE_WALLET_FILE_ACTION = () => Object ({ type: GENERATE_WALLET_FILE })