@tanstack/history
Advanced tools
Comparing version 1.95.0 to 1.95.2
@@ -33,3 +33,3 @@ export interface NavigateOptions { | ||
export interface HistoryLocation extends ParsedPath { | ||
state: HistoryState; | ||
state: ParsedHistoryState; | ||
} | ||
@@ -43,5 +43,7 @@ export interface ParsedPath { | ||
export interface HistoryState { | ||
} | ||
export type ParsedHistoryState = HistoryState & { | ||
key?: string; | ||
__TSR_index: number; | ||
} | ||
}; | ||
type ShouldAllowNavigation = any; | ||
@@ -103,3 +105,3 @@ export type HistoryAction = 'PUSH' | 'REPLACE' | 'FORWARD' | 'BACK' | 'GO'; | ||
}): RouterHistory; | ||
export declare function parseHref(href: string, state: HistoryState | undefined): HistoryLocation; | ||
export declare function parseHref(href: string, state: ParsedHistoryState | undefined): HistoryLocation; | ||
export {}; |
{ | ||
"name": "@tanstack/history", | ||
"version": "1.95.0", | ||
"version": "1.95.2", | ||
"description": "Modern and scalable routing for React applications", | ||
@@ -5,0 +5,0 @@ "author": "Tanner Linsley", |
@@ -43,3 +43,3 @@ // While the public API was clearly inspired by the "history" npm package, | ||
export interface HistoryLocation extends ParsedPath { | ||
state: HistoryState | ||
state: ParsedHistoryState | ||
} | ||
@@ -54,3 +54,5 @@ | ||
export interface HistoryState { | ||
export interface HistoryState {} | ||
export type ParsedHistoryState = HistoryState & { | ||
key?: string | ||
@@ -259,3 +261,3 @@ __TSR_index: number | ||
[stateIndexKey]: index, | ||
} | ||
} as ParsedHistoryState | ||
} | ||
@@ -559,3 +561,3 @@ | ||
: entries.length - 1 | ||
const states = entries.map<HistoryState>((_entry, index) => | ||
const states = entries.map((_entry, index) => | ||
assignKeyAndIndex(index, undefined), | ||
@@ -598,3 +600,3 @@ ) | ||
href: string, | ||
state: HistoryState | undefined, | ||
state: ParsedHistoryState | undefined, | ||
): HistoryLocation { | ||
@@ -601,0 +603,0 @@ const hashIndex = href.indexOf('#') |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
104974
1456