react-router-test-context
react-router-test-context copied to clipboard
Add TypeScript type definitions
Hello!
I use typescript in my project and it would be perfect to have type definitions for your library. http://definitelytyped.org/
Thanks.
If someone were to open a PR that adds TypeScript (or Flow) types, I would be happy to merge it.
For anyone looking for a place to start for type definitions:
declare module "react-router-test-context" {
import { match, RouteComponentProps, RouterChildContext, StaticContext } from "react-router";
type ReactRouterTestContext<P = any> = RouterChildContext<P> & { router: { staticContext: StaticContext } };
interface ReactRouterTestContextOptions<P = any, C extends StaticContext = StaticContext> extends Partial<RouteComponentProps<P, C>> { }
export default function(options?: ReactRouterTestContextOptions): ReactRouterTestContext;
}
Hope that helps.
cc: @pshrmn