Skip to content

Commit 3feeaf0

Browse files
committed
--amend
1 parent da9d8fd commit 3feeaf0

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

client/modules/IDE/actions/preferences.ts

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,12 @@ export function setTheme(value: SetThemeValue) {
270270
};
271271
}
272272

273-
export function setAutorefresh(value) {
273+
export type SetAutorefreshValue = PreferencesState['autorefresh'];
274+
export type SetAutorefreshAction = {
275+
type: typeof ActionTypes.SET_AUTOREFRESH;
276+
value: SetAutorefreshValue;
277+
};
278+
export function setAutorefresh(value: SetAutorefreshValue) {
274279
return (dispatch: UpdatePreferencesDispatch, getState: GetRootState) => {
275280
dispatch({
276281
type: ActionTypes.SET_AUTOREFRESH,
@@ -288,14 +293,25 @@ export function setAutorefresh(value) {
288293
};
289294
}
290295

291-
export function setAllAccessibleOutput(value) {
296+
export type SetAllAccessibleOutputValue =
297+
| SetTextOutputValue
298+
| SetGridOutputValue;
299+
export function setAllAccessibleOutput(value: SetAllAccessibleOutputValue) {
292300
return (dispatch: UpdatePreferencesDispatch, getState: GetRootState) => {
293301
dispatch(setTextOutput(value));
294302
dispatch(setGridOutput(value));
295303
};
296304
}
297305

298-
export function setLanguage(value, { persistPreference = true } = {}) {
306+
export type SetLanguageValue = PreferencesState['language'];
307+
export type SetLanguageAction = {
308+
type: typeof ActionTypes.SET_AUTOREFRESH;
309+
value: SetLanguageValue;
310+
};
311+
export function setLanguage(
312+
value: SetLanguageValue,
313+
{ persistPreference = true } = {}
314+
) {
299315
return (dispatch: UpdatePreferencesDispatch, getState: GetRootState) => {
300316
i18next.changeLanguage(value);
301317
dispatch({

0 commit comments

Comments
 (0)