From e1932febb2a1454bfa4fccb7e7fdd0cbffcd14eb Mon Sep 17 00:00:00 2001 From: David Lechner Date: Thu, 21 Jan 2021 22:25:13 -0600 Subject: [PATCH] drop CurrentEditSession type It is better to not hide the nullability. --- src/reducers/editor.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/reducers/editor.ts b/src/reducers/editor.ts index 111869de..593d9ebb 100644 --- a/src/reducers/editor.ts +++ b/src/reducers/editor.ts @@ -6,9 +6,7 @@ import { Reducer, combineReducers } from 'redux'; import { Action } from '../actions'; import { EditorActionType } from '../actions/editor'; -type CurrentEditSession = Ace.EditSession | null; - -const current: Reducer = (state = null, action) => { +const current: Reducer = (state = null, action) => { switch (action.type) { case EditorActionType.Current: return action.editSession || null; @@ -18,6 +16,6 @@ const current: Reducer = (state = null, action) => { }; export interface EditorState { - current: CurrentEditSession; + current: Ace.EditSession | null; } export default combineReducers({ current });