@written/route-parameters
v0.1.11
Published
Express' Route Parameters Types, extracted
Downloads
17
Readme
@written/route-parameters
TypeScript type for route parameters, extracted from a route string. Heavily based on @types/express' type.
Installation
In your project, run:
pnpm i @written/route-parameters -D
Usage
import type { RouteParameters } from '@written/route-parameters';
type Params = RouteParameters<'/test/:abc'>; // = {abc:string}