Skip to content

Commit 9e4b215

Browse files
committed
chore: add typings;
- Closes #4
1 parent c2d5b3b commit 9e4b215

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

β€Žpackage.jsonβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"description": "A tiny (285B) utility that converts route patterns into RegExp. Limited alternative to `path-to-regexp` πŸ™‡β€",
66
"module": "dist/regexparam.mjs",
77
"main": "dist/regexparam.js",
8+
"types": "types.d.ts",
89
"license": "MIT",
910
"author": {
1011
"name": "Luke Edwards",
@@ -20,6 +21,7 @@
2021
"test": "tape test/*.js | tap-spec"
2122
},
2223
"files": [
24+
"*.d.ts",
2325
"dist"
2426
],
2527
"keywords": [

β€Žtypes.d.tsβ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export interface RouteParsed {
2+
keys: Array<string>,
3+
pattern: RegExp
4+
}
5+
declare const regexparam: (route: string, loose?: boolean) => RouteParsed;
6+
export default regexparam;

0 commit comments

Comments
Β (0)