@@ -5,6 +5,8 @@ import * as ActionTypes from '../../../constants';
55import type { PreferencesState } from '../reducers/preferences' ;
66import type { RootState } from '../../../reducers' ;
77
8+ // Action definitions:
9+
810export type UpdatePreferencesDispatch = ( action : unknown ) => void ;
911export type GetRootState = ( ) => RootState ;
1012
@@ -199,7 +201,12 @@ export function setLintWarning(value: SetLintWarningValue) {
199201 } ;
200202}
201203
202- export function setTextOutput ( value ) {
204+ export type SetTextOutputValue = PreferencesState [ 'textOutput' ] ;
205+ export type SetTextOutputAction = {
206+ type : typeof ActionTypes . SET_TEXT_OUTPUT ;
207+ value : SetTextOutputValue ;
208+ } ;
209+ export function setTextOutput ( value : SetTextOutputValue ) {
203210 return ( dispatch : UpdatePreferencesDispatch , getState : GetRootState ) => {
204211 dispatch ( {
205212 type : ActionTypes . SET_TEXT_OUTPUT ,
@@ -217,7 +224,12 @@ export function setTextOutput(value) {
217224 } ;
218225}
219226
220- export function setGridOutput ( value ) {
227+ export type SetGridOutputValue = PreferencesState [ 'gridOutput' ] ;
228+ export type SetGridOutputAction = {
229+ type : typeof ActionTypes . SET_GRID_OUTPUT ;
230+ value : SetGridOutputValue ;
231+ } ;
232+ export function setGridOutput ( value : SetGridOutputValue ) {
221233 return ( dispatch : UpdatePreferencesDispatch , getState : GetRootState ) => {
222234 dispatch ( {
223235 type : ActionTypes . SET_GRID_OUTPUT ,
0 commit comments