-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
4,790 additions
and
3,668 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
// flow-typed signature: 984f6785a321187ac15c3434bbd7f25d | ||
// flow-typed version: 568ec63cee/history_v4.x.x/flow_>=v0.25.x | ||
|
||
declare module "history/createBrowserHistory" { | ||
declare function Unblock(): void; | ||
|
||
declare export type Action = "PUSH" | "REPLACE" | "POP"; | ||
|
||
declare export type BrowserLocation = { | ||
pathname: string, | ||
search: string, | ||
hash: string, | ||
// Browser and Memory specific | ||
state: string, | ||
key: string, | ||
}; | ||
|
||
declare export type BrowserHistory = { | ||
length: number, | ||
location: BrowserLocation, | ||
action: Action, | ||
push: (path: string, Array<mixed>) => void, | ||
replace: (path: string, Array<mixed>) => void, | ||
go: (n: number) => void, | ||
goBack: () => void, | ||
goForward: () => void, | ||
listen: Function, | ||
block: (message: string) => Unblock, | ||
block: ((location: BrowserLocation, action: Action) => string) => Unblock, | ||
push: (path: string) => void, | ||
}; | ||
|
||
declare type HistoryOpts = { | ||
basename?: string, | ||
forceRefresh?: boolean, | ||
getUserConfirmation?: ( | ||
message: string, | ||
callback: (willContinue: boolean) => void, | ||
) => void, | ||
}; | ||
|
||
declare export default (opts?: HistoryOpts) => BrowserHistory; | ||
} | ||
|
||
declare module "history/createMemoryHistory" { | ||
declare function Unblock(): void; | ||
|
||
declare export type Action = "PUSH" | "REPLACE" | "POP"; | ||
|
||
declare export type MemoryLocation = { | ||
pathname: string, | ||
search: string, | ||
hash: string, | ||
// Browser and Memory specific | ||
state: string, | ||
key: string, | ||
}; | ||
|
||
declare export type MemoryHistory = { | ||
length: number, | ||
location: MemoryLocation, | ||
action: Action, | ||
index: number, | ||
entries: Array<string>, | ||
push: (path: string, Array<mixed>) => void, | ||
replace: (path: string, Array<mixed>) => void, | ||
go: (n: number) => void, | ||
goBack: () => void, | ||
goForward: () => void, | ||
// Memory only | ||
canGo: (n: number) => boolean, | ||
listen: Function, | ||
block: (message: string) => Unblock, | ||
block: ((location: MemoryLocation, action: Action) => string) => Unblock, | ||
push: (path: string) => void, | ||
}; | ||
|
||
declare type HistoryOpts = { | ||
initialEntries?: Array<string>, | ||
initialIndex?: number, | ||
keyLength?: number, | ||
getUserConfirmation?: ( | ||
message: string, | ||
callback: (willContinue: boolean) => void, | ||
) => void, | ||
}; | ||
|
||
declare export default (opts?: HistoryOpts) => MemoryHistory; | ||
} | ||
|
||
declare module "history/createHashHistory" { | ||
declare function Unblock(): void; | ||
|
||
declare export type Action = "PUSH" | "REPLACE" | "POP"; | ||
|
||
declare export type HashLocation = { | ||
pathname: string, | ||
search: string, | ||
hash: string, | ||
}; | ||
|
||
declare export type HashHistory = { | ||
length: number, | ||
location: HashLocation, | ||
action: Action, | ||
push: (path: string, Array<mixed>) => void, | ||
replace: (path: string, Array<mixed>) => void, | ||
go: (n: number) => void, | ||
goBack: () => void, | ||
goForward: () => void, | ||
listen: Function, | ||
block: (message: string) => Unblock, | ||
block: ((location: HashLocation, action: Action) => string) => Unblock, | ||
push: (path: string) => void, | ||
}; | ||
|
||
declare type HistoryOpts = { | ||
basename?: string, | ||
hashType: "slash" | "noslash" | "hashbang", | ||
getUserConfirmation?: ( | ||
message: string, | ||
callback: (willContinue: boolean) => void, | ||
) => void, | ||
}; | ||
|
||
declare export default (opts?: HistoryOpts) => HashHistory; | ||
} |
Oops, something went wrong.