File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ export interface Location<S extends State = State> extends Path {
102
102
*
103
103
* @see https://github.com/ReactTraining/history/tree/master/docs/api-reference.md#location.state
104
104
*/
105
- state : S ;
105
+ state : S | null ;
106
106
107
107
/**
108
108
* A unique string associated with this location. May be used to safely store
@@ -123,7 +123,7 @@ export type PartialPath = Partial<Path>;
123
123
/**
124
124
* A partial Location object that may be missing some properties.
125
125
*/
126
- export type PartialLocation = Partial < Location > ;
126
+ export type PartialLocation < S extends State = State > = Partial < Location < S > > ;
127
127
128
128
/**
129
129
* A change to the current location.
@@ -216,7 +216,7 @@ export interface History<S extends State = State> {
216
216
*
217
217
* @see https://github.com/ReactTraining/history/tree/master/docs/api-reference.md#history.push
218
218
*/
219
- push ( to : To , state ?: S ) : void ;
219
+ push ( to : To , state ?: S | null ) : void ;
220
220
221
221
/**
222
222
* Replaces the current location in the history stack with a new one. The
@@ -227,7 +227,7 @@ export interface History<S extends State = State> {
227
227
*
228
228
* @see https://github.com/ReactTraining/history/tree/master/docs/api-reference.md#history.replace
229
229
*/
230
- replace ( to : To , state ?: S ) : void ;
230
+ replace ( to : To , state ?: S | null ) : void ;
231
231
232
232
/**
233
233
* Navigates `n` entries backward/forward in the history stack relative to the
You can’t perform that action at this time.
0 commit comments