@types/react-router-config
Advanced tools
Comparing version 5.0.1 to 5.0.2
@@ -10,7 +10,8 @@ // Type definitions for react-router-config 5.0 | ||
import * as React from "react"; | ||
import { RouteComponentProps, SwitchProps, match } from "react-router"; | ||
import { Location } from "history"; | ||
import * as React from 'react'; | ||
import { RouteComponentProps, SwitchProps, match } from 'react-router'; | ||
import { Location } from 'history'; | ||
export interface RouteConfigComponentProps<Params extends { [K in keyof Params]?: string } = {}> extends RouteComponentProps<Params> { | ||
export interface RouteConfigComponentProps<Params extends { [K in keyof Params]?: string } = {}> | ||
extends RouteComponentProps<Params> { | ||
route?: RouteConfig; | ||
@@ -31,8 +32,14 @@ } | ||
export interface MatchedRoute<Params extends { [K in keyof Params]?: string }> { | ||
route: RouteConfig; | ||
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 }>(routes: RouteConfig[], pathname: string): Array<MatchedRoute<Params>>; | ||
export function matchRoutes< | ||
Params extends { [K in keyof Params]?: string }, | ||
TRouteConfig extends RouteConfig = RouteConfig | ||
>(routes: TRouteConfig[], pathname: string): Array<MatchedRoute<Params, TRouteConfig>>; | ||
@@ -39,0 +46,0 @@ export function renderRoutes( |
{ | ||
"name": "@types/react-router-config", | ||
"version": "5.0.1", | ||
"version": "5.0.2", | ||
"description": "TypeScript definitions for react-router-config", | ||
@@ -29,3 +29,3 @@ "license": "MIT", | ||
"main": "", | ||
"types": "index", | ||
"types": "index.d.ts", | ||
"repository": { | ||
@@ -42,4 +42,4 @@ "type": "git", | ||
}, | ||
"typesPublisherContentHash": "5f986a865bb10c40b293dedac1c2bb40c259f93689330b958a1441a4509d2ef3", | ||
"typeScriptVersion": "2.8" | ||
"typesPublisherContentHash": "497d58b1be6e9e11d1a20ca3e09a4338a8ab4d0103bfd8f8f177c70eabd939e6", | ||
"typeScriptVersion": "3.3" | ||
} |
@@ -8,10 +8,10 @@ # Installation | ||
# Details | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-router-config | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-router-config. | ||
Additional Details | ||
* Last updated: Mon, 23 Sep 2019 17:30:47 GMT | ||
* Dependencies: @types/react, @types/react-router, @types/history | ||
### Additional Details | ||
* Last updated: Sat, 19 Dec 2020 18:10:54 GMT | ||
* Dependencies: [@types/react](https://npmjs.com/package/@types/react), [@types/react-router](https://npmjs.com/package/@types/react-router), [@types/history](https://npmjs.com/package/@types/history) | ||
* Global values: none | ||
# Credits | ||
These definitions were written by François Nguyen <https://github.com/lith-light-g>, John Reilly <https://github.com/johnnyreilly>, Phoenix He <https://github.com/NullMDR>, and Mathieu TUDISCO <https://github.com/mathieutu>. | ||
These definitions were written by [François Nguyen](https://github.com/lith-light-g), [John Reilly](https://github.com/johnnyreilly), [Phoenix He](https://github.com/NullMDR), and [Mathieu TUDISCO](https://github.com/mathieutu). |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5123
42