@uppercod/exp-route
Advanced tools
Comparing version 1.4.1 to 1.4.2
{ | ||
"name": "@uppercod/exp-route", | ||
"type": "module", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "exp-route, designed to compare routes on the client based on simple expressions", | ||
@@ -26,3 +26,3 @@ "publishConfig": { | ||
"devDependencies": { | ||
"@atomico/exports": "^1.13.1", | ||
"@atomico/exports": "^1.13.2", | ||
"ava": "^3.10.1", | ||
@@ -46,20 +46,20 @@ "rollup": "^2.35.1", | ||
"./create-match": { | ||
"default": "./src/create-match.js", | ||
"types": "./types/create-match.d.ts" | ||
"types": "./types/create-match.d.ts", | ||
"default": "./src/create-match.js" | ||
}, | ||
"./exp-route": { | ||
"default": "./src/exp-route.js", | ||
"types": "./types/exp-route.d.ts" | ||
"types": "./types/exp-route.d.ts", | ||
"default": "./src/exp-route.js" | ||
}, | ||
"./path-to-regexp": { | ||
"default": "./src/path-to-regexp.js", | ||
"types": "./types/path-to-regexp.d.ts" | ||
"types": "./types/path-to-regexp.d.ts", | ||
"default": "./src/path-to-regexp.js" | ||
}, | ||
"./search-params": { | ||
"default": "./src/search-params.js", | ||
"types": "./types/search-params.d.ts" | ||
"types": "./types/search-params.d.ts", | ||
"default": "./src/search-params.js" | ||
}, | ||
".": { | ||
"default": "./src/exp-route.js", | ||
"types": "./types/exp-route.d.ts" | ||
"types": "./types/exp-route.d.ts", | ||
"default": "./src/exp-route.js" | ||
} | ||
@@ -66,0 +66,0 @@ }, |
@@ -9,4 +9,3 @@ export * from "./create-match.js"; | ||
/** | ||
* @template {Params} T | ||
* @typedef { (path:string)=>T|undefined} Match | ||
* @typedef {(path:string)=>Params|undefined} Match | ||
*/ |
export * from "./create-match.js"; | ||
export * from "./search-params.js"; | ||
export type Params = Record<string, string>; | ||
export type Match<T extends Params> = (path: string) => T | undefined; | ||
export type Match = (path: string) => Params | undefined; |
8273
150