Last active
November 25, 2016 22:32
-
-
Save aaronjensen/48fcfaa0d540805d30fa18114c224f3f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// @flow | |
/* eslint-disable */ | |
declare module 'react-router' { | |
declare type RenderArgs = { | |
params: Object, | |
location: Location, | |
} | |
declare type RenderFn = (args: RenderArgs) => React$Element<*> | |
declare export type Location = { | |
pathname: string, | |
search: string, | |
hash: string, | |
state: any, | |
key?: string, | |
} | |
declare export type Router = { | |
createHref: () => {}, | |
transitionTo: () => {}, | |
replaceWtih: () => {}, | |
blockTransitions: () => {}, | |
} | |
declare export class Link extends React$Component { | |
props: { | |
to: string | Object, | |
activeStyle?: Object, | |
activeClassName?: string, | |
location?: Object, | |
activeOnlyWhenExact?: boolean, | |
isActive?: Function, | |
children?: React$Element<*> | RenderFn, | |
style?: Object, | |
className?: string, | |
target?: string, | |
onClick?: Function, | |
} | |
} | |
declare export class Match extends React$Component { | |
props: { | |
pattern?: string, | |
exactly?: boolean, | |
location?: Object, | |
children?: RenderFn, | |
render?: RenderFn, | |
component?: ReactClass<*>, | |
} | |
} | |
declare export class Miss extends React$Component { | |
props: { | |
location?: Location, | |
render?: RenderFn, | |
component?: ReactClass<*>, | |
} | |
} | |
declare export class Redirect extends React$Component { | |
props: { | |
to: string | Object, | |
} | |
} | |
declare export class ServerRouter extends React$Component { | |
props: { | |
context: Object, | |
location: string, | |
children?: React$Element<*> | RenderFn, | |
} | |
} | |
declare export class StaticRouter extends React$Component { | |
props: { | |
action: Object, | |
blockTransitions?: Function, | |
children?: React$Element<*> | RenderFn, | |
createHref?: Function, | |
location: Object | string, | |
basename?: string, | |
onPush: Function, | |
onReplace: Function, | |
stringifyQuery?: Function, | |
parseQuery?: Function, | |
} | |
} | |
declare export function createServerRenderContext(): Object | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment