Skip to content

Commit

Permalink
Merge branch 'SevenOutman-improve-dts' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
chaance committed Aug 17, 2021
2 parents e62360d + e8c0b66 commit a3cc1c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/history/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export interface Location<S extends State = State> extends Path {
*
* @see https://github.com/ReactTraining/history/tree/master/docs/api-reference.md#location.state
*/
state: S;
state: S | null;

/**
* A unique string associated with this location. May be used to safely store
Expand All @@ -123,7 +123,7 @@ export type PartialPath = Partial<Path>;
/**
* A partial Location object that may be missing some properties.
*/
export type PartialLocation = Partial<Location>;
export type PartialLocation<S extends State = State> = Partial<Location<S>>;

/**
* A change to the current location.
Expand Down Expand Up @@ -216,7 +216,7 @@ export interface History<S extends State = State> {
*
* @see https://github.com/ReactTraining/history/tree/master/docs/api-reference.md#history.push
*/
push(to: To, state?: S): void;
push(to: To, state?: S | null): void;

/**
* Replaces the current location in the history stack with a new one. The
Expand All @@ -227,7 +227,7 @@ export interface History<S extends State = State> {
*
* @see https://github.com/ReactTraining/history/tree/master/docs/api-reference.md#history.replace
*/
replace(to: To, state?: S): void;
replace(to: To, state?: S | null): void;

/**
* Navigates `n` entries backward/forward in the history stack relative to the
Expand Down

0 comments on commit a3cc1c1

Please sign in to comment.