We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1085610 + ddf2b05 commit acb93d3Copy full SHA for acb93d3
packages/overmind-website/examples/guide/routing/query.ts
@@ -12,7 +12,9 @@ type IParams = {
12
} | void
13
14
export const router = {
15
- initialize(routes: { [url: string]: (IParams) => void }) {
+ initialize<Params extends IParams>(routes: {
16
+ [url: string]: (params: Params) => void | Promise<void>
17
+ }): void {
18
Object.keys(routes).forEach(url => {
19
page(url, ({ params, querystring }) => {
20
const payload = Object.assign({}, params, queryString.parse(querystring))
0 commit comments