@types/react-router
Advanced tools
Comparing version 5.1.9 to 5.1.10
@@ -137,8 +137,12 @@ // Type definitions for React Router 5.1 | ||
export type ExtractRouteOptionalParam<T extends string> = T extends `${infer Param}?` | ||
? { [k in Param]?: string | number | boolean } | ||
: { [k in T]: string | number | boolean }; | ||
export type ExtractRouteParams<T extends string> = string extends T | ||
? Record<string, string> | ||
? Record<string, string | number> | ||
: T extends `${infer _Start}:${infer Param}/${infer Rest}` | ||
? { [k in Param | keyof ExtractRouteParams<Rest>]: string } | ||
? ExtractRouteOptionalParam<Param> & ExtractRouteParams<Rest> | ||
: T extends `${infer _Start}:${infer Param}` | ||
? { [k in Param]: string } | ||
? ExtractRouteOptionalParam<Param> | ||
: {}; | ||
@@ -145,0 +149,0 @@ |
{ | ||
"name": "@types/react-router", | ||
"version": "5.1.9", | ||
"version": "5.1.10", | ||
"description": "TypeScript definitions for React Router", | ||
@@ -127,4 +127,4 @@ "license": "MIT", | ||
}, | ||
"typesPublisherContentHash": "ad71298302ad74741508b388cefc274d77b466f2f082a995389eccf7ca4efab1", | ||
"typesPublisherContentHash": "ed4af19df45cd4192eb1947d0a3001cbc40e34c129b54bbbc04bf66b5ab9dc27", | ||
"typeScriptVersion": "3.3" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Mon, 28 Dec 2020 13:53:53 GMT | ||
* Last updated: Wed, 06 Jan 2021 14:53:46 GMT | ||
* Dependencies: [@types/react](https://npmjs.com/package/@types/react), [@types/history](https://npmjs.com/package/@types/history) | ||
@@ -14,0 +14,0 @@ * Global values: none |
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
18312
273