@@ -312,11 +312,11 @@ export interface MemoryHistory<S extends State = State> extends History<S> {
312312index :number ;
313313}
314314
315- const readOnly :< T extends unknown > ( obj :T ) => T = __DEV__
316- ?obj => Object . freeze ( obj )
317- :obj => obj ;
315+ const readOnly :< T > ( obj :T ) => Readonly < T > = __DEV__
316+ ?( obj ) => Object . freeze ( obj )
317+ :( obj ) => obj ;
318318
319- function warning ( cond :boolean , message :string ) {
319+ function warning ( cond :any , message :string ) {
320320if ( ! cond ) {
321321// eslint-disable-next-line no-console
322322if ( typeof console !== 'undefined' ) console . warn ( message ) ;
@@ -545,7 +545,7 @@ export function createBrowserHistory(
545545window . addEventListener ( BeforeUnloadEventType , promptBeforeUnload ) ;
546546}
547547
548- return function ( ) {
548+ return function ( ) {
549549unblock ( ) ;
550550
551551// Remove the beforeunload listener so the document may
@@ -582,9 +582,11 @@ export function createHashHistory(
582582let globalHistory = window . history ;
583583
584584function getIndexAndLocation ( ) :[ number , Location ] {
585- let { pathname= '/' , search= '' , hash= '' } = parsePath (
586- window . location . hash . substr ( 1 )
587- ) ;
585+ let {
586+ pathname= '/' ,
587+ search= '' ,
588+ hash= ''
589+ } = parsePath ( window . location . hash . substr ( 1 ) ) ;
588590let state = globalHistory . state || { } ;
589591return [
590592state . idx ,
@@ -804,7 +806,7 @@ export function createHashHistory(
804806window . addEventListener ( BeforeUnloadEventType , promptBeforeUnload ) ;
805807}
806808
807- return function ( ) {
809+ return function ( ) {
808810unblock ( ) ;
809811
810812// Remove the beforeunload listener so the document may
@@ -845,7 +847,7 @@ export function createMemoryHistory(
845847options :MemoryHistoryOptions = { }
846848) :MemoryHistory {
847849let { initialEntries= [ '/' ] , initialIndex} = options ;
848- let entries :Location [ ] = initialEntries . map ( entry => {
850+ let entries :Location [ ] = initialEntries . map ( ( entry ) => {
849851let location = readOnly < Location > ( {
850852pathname :'/' ,
851853search :'' ,
@@ -1016,20 +1018,18 @@ function createEvents<F extends Function>(): Events<F> {
10161018} ,
10171019push ( fn :F ) {
10181020handlers . push ( fn ) ;
1019- return function ( ) {
1020- handlers = handlers . filter ( handler => handler !== fn ) ;
1021+ return function ( ) {
1022+ handlers = handlers . filter ( ( handler ) => handler !== fn ) ;
10211023} ;
10221024} ,
10231025call ( arg ) {
1024- handlers . forEach ( fn => fn && fn ( arg ) ) ;
1026+ handlers . forEach ( ( fn ) => fn && fn ( arg ) ) ;
10251027}
10261028} ;
10271029}
10281030
10291031function createKey ( ) {
1030- return Math . random ( )
1031- . toString ( 36 )
1032- . substr ( 2 , 8 ) ;
1032+ return Math . random ( ) . toString ( 36 ) . substr ( 2 , 8 ) ;
10331033}
10341034
10351035/**