import { createSelector } from 'reselect' ; import { PlotTabState , State , Tab } from '../models' ; import { GenericState , UndoableStateBase } from '../models' ; export const selectTab = ( state ) : Tab => state . undoable . present . tab ; export const selectActiveTabID = createSelector ( selectTab , ( tab ) : number => tab . activeTabID ) ; export const selectActiveTab = createSelector ( selectTab , selectActiveTabID , ( tab , activeTabID ) : PlotTabState => tab . list [ activeTabID ] ) ;