improve reducer typings
This commit is contained in:
parent
38c534b3aa
commit
c71b24ebea
5 changed files with 40 additions and 32 deletions
|
|
@ -24,7 +24,7 @@ import {
|
|||
SESSION_SET_CWD
|
||||
} from '../constants/sessions';
|
||||
import {UPDATE_AVAILABLE} from '../constants/updater';
|
||||
import {uiState} from '../hyper';
|
||||
import {uiState, HyperActions} from '../hyper';
|
||||
|
||||
const allowedCursorShapes = new Set(['BEAM', 'BLOCK', 'UNDERLINE']);
|
||||
const allowedCursorBlinkValues = new Set([true, false]);
|
||||
|
|
@ -114,7 +114,7 @@ const initial: ImmutableType<uiState> = Immutable({
|
|||
|
||||
const currentWindow = remote.getCurrentWindow();
|
||||
|
||||
const reducer = (state = initial, action: any) => {
|
||||
const reducer = (state = initial, action: HyperActions) => {
|
||||
let state_ = state;
|
||||
let isMax;
|
||||
//eslint-disable-next-line default-case
|
||||
|
|
@ -450,4 +450,6 @@ const reducer = (state = initial, action: any) => {
|
|||
return state_;
|
||||
};
|
||||
|
||||
export type IUiReducer = typeof reducer;
|
||||
|
||||
export default decorateUIReducer(reducer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue