@types/react-router-config
TypeScript definitions for react-router-config
Last updated 8 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/react-router-config 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/react-router-config

Summary

This package contains type definitions for react-router-config (https://github.com/ReactTraining/react-router/tree/master/packages/react-router-config).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-router-config.

index.d.ts

import { Location } from "history";
import * as React from "react";
import { match, RouteComponentProps, SwitchProps } from "react-router";

export interface RouteConfigComponentProps<Params extends { [K in keyof Params]?: string } = {}>
    extends RouteComponentProps<Params>
{
    route?: RouteConfig | undefined;
}

export interface RouteConfig {
    key?: React.Key | undefined;
    location?: Location | undefined;
    component?: React.ComponentType<RouteConfigComponentProps<any>> | React.ComponentType | undefined;
    path?: string | string[] | undefined;
    exact?: boolean | undefined;
    strict?: boolean | undefined;
    routes?: RouteConfig[] | undefined;
    render?: ((props: RouteConfigComponentProps<any>) => React.ReactNode) | undefined;
    [propName: string]: any;
}

export interface MatchedRoute<
    Params extends { [K in keyof Params]?: string },
    TRouteConfig extends RouteConfig = RouteConfig,
> {
    route: TRouteConfig;
    match: match<Params>;
}

export function matchRoutes<
    Params extends { [K in keyof Params]?: string },
    TRouteConfig extends RouteConfig = RouteConfig,
>(routes: TRouteConfig[], pathname: string): Array<MatchedRoute<Params, TRouteConfig>>;

export function renderRoutes(
    routes: RouteConfig[] | undefined,
    extraProps?: any,
    switchProps?: SwitchProps,
): React.JSX.Element;

Additional Details

Credits

These definitions were written by John Reilly, and Mathieu TUDISCO.

Current Tags

  • 5.0.11                                ...           latest (2 years ago)
  • 1.0.1                                ...           ts2.2 (9 years ago)
  • 1.0.4                                ...           ts2.3 (9 years ago)
  • 1.0.5                                ...           ts2.4 (8 years ago)
  • 1.0.5                                ...           ts2.5 (8 years ago)
  • 1.0.6                                ...           ts2.6 (8 years ago)
  • 1.0.6                                ...           ts2.7 (8 years ago)
  • 5.0.1                                ...           ts2.8 (7 years ago)
  • 5.0.1                                ...           ts2.9 (7 years ago)
  • 5.0.1                                ...           ts3.0 (7 years ago)
  • 5.0.1                                ...           ts3.1 (7 years ago)
  • 5.0.1                                ...           ts3.2 (7 years ago)
  • 5.0.2                                ...           ts3.3 (5 years ago)
  • 5.0.2                                ...           ts3.4 (5 years ago)
  • 5.0.2                                ...           ts3.5 (5 years ago)
  • 5.0.3                                ...           ts3.6 (5 years ago)
  • 5.0.3                                ...           ts3.7 (5 years ago)
  • 5.0.6                                ...           ts3.8 (4 years ago)
  • 5.0.6                                ...           ts3.9 (4 years ago)
  • 5.0.6                                ...           ts4.0 (4 years ago)
  • 5.0.6                                ...           ts4.1 (4 years ago)
  • 5.0.6                                ...           ts4.2 (4 years ago)
  • 5.0.7                                ...           ts4.3 (3 years ago)
  • 5.0.7                                ...           ts4.4 (3 years ago)
  • 5.0.10                                ...           ts4.5 (2 years ago)
  • 5.0.11                                ...           ts4.6 (2 years ago)
  • 5.0.11                                ...           ts4.7 (2 years ago)
  • 5.0.11                                ...           ts4.8 (2 years ago)
  • 5.0.11                                ...           ts4.9 (2 years ago)
  • 5.0.11                                ...           ts5.0 (2 years ago)
  • 5.0.11                                ...           ts5.1 (2 years ago)
  • 5.0.11                                ...           ts5.2 (2 years ago)
  • 5.0.11                                ...           ts5.3 (2 years ago)
  • 5.0.11                                ...           ts5.4 (2 years ago)
  • 5.0.11                                ...           ts5.5 (2 years ago)
  • 5.0.11                                ...           ts5.6 (2 years ago)
  • 5.0.11                                ...           ts5.7 (2 years ago)
  • 5.0.11                                ...           ts5.8 (2 years ago)
  • 5.0.11                                ...           ts5.9 (2 years ago)
  • 5.0.11                                ...           ts6.0 (2 years ago)

26 Versions

  • 5.0.11                                ...           2 years ago
  • 5.0.10                                ...           2 years ago
  • 5.0.9                                ...           2 years ago
  • 5.0.8                                ...           3 years ago
  • 5.0.7                                ...           3 years ago
  • 5.0.6                                ...           4 years ago
  • 5.0.5                                ...           4 years ago
  • 5.0.4                                ...           4 years ago
  • 5.0.3                                ...           5 years ago
  • 5.0.2                                ...           5 years ago
  • 5.0.1                                ...           7 years ago
  • 5.0.0                                ...           7 years ago
  • 1.1.3                                ...           7 years ago
  • 1.1.2                                ...           7 years ago
  • 1.1.1                                ...           7 years ago
  • 1.1.0                                ...           7 years ago
  • 1.0.9                                ...           8 years ago
  • 1.0.8                                ...           8 years ago
  • 1.0.7                                ...           8 years ago
  • 1.0.6                                ...           8 years ago
  • 1.0.5                                ...           8 years ago
  • 1.0.4                                ...           9 years ago
  • 1.0.3                                ...           9 years ago
  • 1.0.2                                ...           9 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dev Dependencies (0)
None

Copyright 2013 - present © cnpmjs.org | Home |