diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2018-12-05 17:32:18 +0100 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-12-05 20:20:59 +0100 |
commit | 41c98779d38bda9fdfdca182a5f20c73fcff9a84 (patch) | |
tree | d895a9f8bfd0276aee5ffacf7bb33a0109436cbd /server/sonar-web/src/main/js/apps/settings/store/values.ts | |
parent | a9c22c1185c5fd8c8dc4c9388f4a3b967e3f463d (diff) | |
download | sonarqube-41c98779d38bda9fdfdca182a5f20c73fcff9a84.tar.gz sonarqube-41c98779d38bda9fdfdca182a5f20c73fcff9a84.zip |
create global type definitions (#1017)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/settings/store/values.ts')
-rw-r--r-- | server/sonar-web/src/main/js/apps/settings/store/values.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/apps/settings/store/values.ts b/server/sonar-web/src/main/js/apps/settings/store/values.ts index e00727a86a5..023148c7a5b 100644 --- a/server/sonar-web/src/main/js/apps/settings/store/values.ts +++ b/server/sonar-web/src/main/js/apps/settings/store/values.ts @@ -21,7 +21,6 @@ import { combineReducers } from 'redux'; import { keyBy } from 'lodash'; import { ActionType } from '../../../store/utils/actions'; import { Action as AppStateAction, Actions as AppStateActions } from '../../../store/appState'; -import { SettingValue } from '../../../app/types'; enum Actions { receiveValues = 'RECEIVE_VALUES' @@ -30,7 +29,7 @@ enum Actions { type Action = ActionType<typeof receiveValues, Actions.receiveValues>; interface SettingsState { - [key: string]: SettingValue; + [key: string]: T.SettingValue; } export interface State { @@ -77,7 +76,11 @@ function global(state: State['components'] = {}, action: Action | AppStateAction export default combineReducers({ components, global }); -export function getValue(state: State, key: string, component?: string): SettingValue | undefined { +export function getValue( + state: State, + key: string, + component?: string +): T.SettingValue | undefined { if (component) { return state.components[component] && state.components[component][key]; } |