Skip to content

Commit

Permalink
Merge pull request #788 from tighten/fix-query-params-type
Browse files Browse the repository at this point in the history
Fix `queryParams` return type
  • Loading branch information
bakerkretzmar authored Nov 9, 2024
2 parents d3d7cb0 + b0b4398 commit eee6c88
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"qs": "~6.9.7"
},
"devDependencies": {
"@types/qs": "^6.9.17",
"jsdom": "^25.0.1",
"microbundle": "^0.15.1",
"prettier": "^3.3.3",
Expand Down
4 changes: 3 additions & 1 deletion src/js/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { ParsedQs } from 'qs';

/**
* A list of routes and their parameters and bindings.
*
Expand Down Expand Up @@ -166,7 +168,7 @@ interface Router {
current<T extends RouteName>(name: T, params?: ParameterValue | RouteParams<T>): boolean;
get params(): Record<string, string>;
get routeParams(): Record<string, string>;
get queryParams(): Record<string, string>;
get queryParams(): ParsedQs;
has<T extends RouteName>(name: T): boolean;
}

Expand Down

0 comments on commit eee6c88

Please sign in to comment.