manages browsing session history jsr.io/@mary/history
typescript jsr

refactor: clean it up a little

mary.my.id c2198a4b 0e723a2d

verified
Changed files
+6 -13
lib
+6 -13
lib/mod.ts
··· 1 - // Fork of `history` npm package 2 - // Repository: github.com/remix-run/history 3 - // Commit: 3e9dab413f4eda8d6bce565388c5ddb7aeff9f7e 1 + // fork of `history` npm package 2 + // repository: github.com/remix-run/history 3 + // commit: 3e9dab413f4eda8d6bce565388c5ddb7aeff9f7e 4 4 5 - // Most of the changes are just trimming it down to only include the browser 5 + // most of the changes are just trimming it down to only include the browser 6 6 // history implementation. 7 7 8 8 import { DEV } from 'esm-env'; ··· 72 72 export type To = string | Partial<Path>; 73 73 74 74 /** 75 - * public interface for interacting with browser-like history. 75 + * interface for interacting with the browser history. 76 76 */ 77 - export interface History { 77 + export interface BrowserHistory { 78 78 readonly location: Location; 79 79 80 80 /** ··· 124 124 replace?: boolean; 125 125 state?: unknown; 126 126 } 127 - 128 - /** 129 - * A browser history stores the current location in regular URLs in a web 130 - * browser environment. This is the standard for most web apps and provides the 131 - * cleanest URLs the browser's address bar. 132 - */ 133 - export interface BrowserHistory extends History {} 134 127 135 128 const warning = (cond: unknown, message: string) => { 136 129 if (DEV && !cond) {