@@ -25,12 +25,7 @@ function logError(type: string) {
2525 }
2626}
2727
28- export interface Props <
29- S ,
30- A extends Action < string > ,
31- MonitorState ,
32- MonitorAction extends Action < string > ,
33- > {
28+ export interface Props < S , A extends Action < string > , MonitorState > {
3429 store ?: EnhancedStore < S , A , MonitorState > ;
3530}
3631
@@ -65,9 +60,7 @@ export default function createDevTools<
6560 ( state : LiftedState < S , A , MonitorState > ) => state ,
6661 ) ( Monitor as React . ComponentType < any > ) ;
6762
68- return class DevTools extends Component <
69- Props < S , A , MonitorState , MonitorAction >
70- > {
63+ return class DevTools extends Component < Props < S , A , MonitorState > > {
7164 liftedStore ?: LiftedStore < S , A , MonitorState > ;
7265
7366 static instrument = (
@@ -78,11 +71,8 @@ export default function createDevTools<
7871 options ,
7972 ) ;
8073
81- constructor (
82- props : Props < S , A , MonitorState , MonitorAction > ,
83- context ?: { store ?: EnhancedStore < S , A , MonitorState > } ,
84- ) {
85- super ( props , context ) ;
74+ constructor ( props : Props < S , A , MonitorState > ) {
75+ super ( props ) ;
8676
8777 if ( ReactReduxContext ) {
8878 if ( this . props . store && ! this . props . store . liftedStore ) {
@@ -91,16 +81,12 @@ export default function createDevTools<
9181 return ;
9282 }
9383
94- if ( ! props . store && ! context ?. store ) {
84+ if ( ! props . store ) {
9585 logError ( 'NoStore' ) ;
9686 return ;
9787 }
9888
99- if ( context ?. store ) {
100- this . liftedStore = context . store . liftedStore ;
101- } else {
102- this . liftedStore = props . store ! . liftedStore ;
103- }
89+ this . liftedStore = props . store . liftedStore ;
10490
10591 if ( ! this . liftedStore ) {
10692 logError ( 'NoLiftedStore' ) ;
0 commit comments