import React from 'react'; import createReactClass from 'create-react-class'; import Reflux from 'reflux'; import GlobalSelectionStore from 'app/stores/globalSelectionStore'; import {GlobalSelection} from 'app/types'; import getDisplayName from 'app/utils/getDisplayName'; type InjectedGlobalSelectionProps = { selection?: GlobalSelection; isGlobalSelectionReady?: boolean; }; type State = { selection: GlobalSelection; isReady?: boolean; }; /** * Higher order component that uses GlobalSelectionStore and provides the * active project */ const withGlobalSelection =
( WrappedComponent: React.ComponentType
) => createReactClass< Omit
& Partial