Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TypeScript type definitions #3

Open
vittorio opened this issue Jan 9, 2018 · 2 comments
Open

Add TypeScript type definitions #3

vittorio opened this issue Jan 9, 2018 · 2 comments

Comments

@vittorio
Copy link

vittorio commented Jan 9, 2018

Hello!

I use typescript in my project and it would be perfect to have type definitions for your library.
http://definitelytyped.org/

Thanks.

@pshrmn
Copy link
Owner

pshrmn commented Jan 9, 2018

If someone were to open a PR that adds TypeScript (or Flow) types, I would be happy to merge it.

@nzacca
Copy link

nzacca commented May 10, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants