From e8c0b66563735a85d474a592c9fdddca4d2446d6 Mon Sep 17 00:00:00 2001 From: Chance Strickland Date: Mon, 16 Aug 2021 21:05:03 -0700 Subject: [PATCH] merge improve-dts --- packages/history/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/history/index.ts b/packages/history/index.ts index c7e2ebbf..17acfb57 100644 --- a/packages/history/index.ts +++ b/packages/history/index.ts @@ -102,7 +102,7 @@ export interface Location 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 @@ -123,7 +123,7 @@ export type PartialPath = Partial; /** * A partial Location object that may be missing some properties. */ -export type PartialLocation = Partial; +export type PartialLocation = Partial>; /** * A change to the current location. @@ -216,7 +216,7 @@ export interface History { * * @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 @@ -227,7 +227,7 @@ export interface History { * * @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