diff --git a/lib/components/term.tsx b/lib/components/term.tsx index 844836bc..5e48570f 100644 --- a/lib/components/term.tsx +++ b/lib/components/term.tsx @@ -11,7 +11,6 @@ import Color from 'color'; import terms from '../terms'; import processClipboard from '../utils/paste'; import SearchBox from './searchBox'; -import ResizeObserver from 'resize-observer-polyfill'; import {TermProps} from '../hyper'; import {ObjectTypedKeys} from '../utils/object'; diff --git a/lib/hyper.d.ts b/lib/hyper.d.ts index d503354e..ed33bbe5 100644 --- a/lib/hyper.d.ts +++ b/lib/hyper.d.ts @@ -162,8 +162,11 @@ export type hyperPlugin = { reduceUI: IUiReducer; }; -import rootReducer from './reducers/index'; -export type HyperState = ReturnType; +export type HyperState = { + ui: Immutable; + sessions: Immutable; + termGroups: Immutable; +}; import {UIActions} from './constants/ui'; import {ConfigActions} from './constants/config'; diff --git a/lib/reducers/index.ts b/lib/reducers/index.ts index 74228dac..95de7d3b 100644 --- a/lib/reducers/index.ts +++ b/lib/reducers/index.ts @@ -1,18 +1,11 @@ -import {combineReducers} from 'redux'; -import ui, {IUiReducer} from './ui'; -import sessions, {ISessionReducer} from './sessions'; -import termGroups, {ITermGroupReducer} from './term-groups'; -import {HyperActions} from '../hyper'; +import {combineReducers, Reducer} from 'redux'; +import ui from './ui'; +import sessions from './sessions'; +import termGroups from './term-groups'; +import {HyperActions, HyperState} from '../hyper'; -export default combineReducers< - { - ui: ReturnType; - sessions: ReturnType; - termGroups: ReturnType; - }, - HyperActions ->({ +export default combineReducers({ ui, sessions, termGroups -}); +}) as Reducer; diff --git a/package.json b/package.json index 444992ec..415e11eb 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,6 @@ "prettier": "2.2.1", "proxyquire": "2.1.3", "redux-devtools-extension": "2.13.8", - "resize-observer-polyfill": "1.5.1", "spectron": "13.0.0", "style-loader": "2.0.0", "terser": "5.6.0", diff --git a/yarn.lock b/yarn.lock index 0102787e..924595c6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6480,11 +6480,6 @@ reselect@4.0.0: resolved "https://registry.npmjs.org/reselect/-/reselect-4.0.0.tgz#f2529830e5d3d0e021408b246a206ef4ea4437f7" integrity sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA== -resize-observer-polyfill@1.5.1: - version "1.5.1" - resolved "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464" - integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg== - resolve-alpn@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.0.0.tgz#745ad60b3d6aff4b4a48e01b8c0bdc70959e0e8c"