@@ -3,28 +3,34 @@ import { Model } from '@redux-model/web';
33import { Reducers } from '@redux-model/web/core/utils/types' ;
44
55interface Data {
6- location : Location ;
7- action : Action ;
6+ location : Location ;
7+ action : Action ;
88}
99
1010type UnsubscribeToken = string ;
1111
1212declare class RouterModel extends Model < Data > {
13- push ( path : Path , state ?: LocationState ) : void ;
14- push < S = LocationState > ( location : LocationDescriptorObject < S > ) : void ;
15- replace ( path : Path , state ?: LocationState ) : void ;
16- replace < S = LocationState > ( location : LocationDescriptorObject < S > ) : void ;
17- go ( index : number ) : void ;
18- goBack ( ) : void ;
19- goForward ( ) : void ;
13+ // They are properties exactly.
14+ push ( path : Path , state ?: LocationState ) : void ;
15+ push < S = LocationState > ( location : LocationDescriptorObject < S > ) : void ;
16+ replace ( path : Path , state ?: LocationState ) : void ;
17+ replace < S = LocationState > ( location : LocationDescriptorObject < S > ) : void ;
18+ go ( index : number ) : void ;
19+ goBack ( ) : void ;
20+ goForward ( ) : void ;
2021
21- subscribe < Params = any > ( path : Path , fn : ( params : Params , location : Location , action : Action ) => void ) : UnsubscribeToken ;
22- unsubscribe ( token : string ) : void ;
22+ getHistory ( ) : History ;
23+ subscribe < Params = any > ( path : Path , fn : ( params : Params , location : Location , action : Action ) => void ) : UnsubscribeToken ;
24+ unsubscribe ( token : string ) : void ;
25+ registerBrowser ( history ?: History ) : Reducers ;
26+ registerHash ( history ?: History ) : Reducers ;
2327
24- registerBrowser ( history ?: History ) : Reducers ;
25- registerHash ( history ?: History ) : Reducers ;
28+ /**
29+ * @deprecated Use registerBrowser() or registerHash()
30+ */
31+ register ( ) : Reducers ;
2632
27- protected initReducer ( ) : ( ( ) => Data ) | Data ;
33+ protected initReducer ( ) : ( ( ) => Data ) | Data ;
2834}
2935
3036export declare const routerModel : RouterModel ;
0 commit comments