aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/settings/store/values.ts
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2018-12-05 17:32:18 +0100
committerSonarTech <sonartech@sonarsource.com>2018-12-05 20:20:59 +0100
commit41c98779d38bda9fdfdca182a5f20c73fcff9a84 (patch)
treed895a9f8bfd0276aee5ffacf7bb33a0109436cbd /server/sonar-web/src/main/js/apps/settings/store/values.ts
parenta9c22c1185c5fd8c8dc4c9388f4a3b967e3f463d (diff)
downloadsonarqube-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.ts9
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];
}