Skip to content

Commit 5938d10

Browse files
authored
Merge pull request #512 from ngdangtu-vn/tu/fix-type
fix(type): allow value from `Params` and `SearchParams` to be optional
2 parents 1753858 + fa46b67 commit 5938d10

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/large-weeks-rescue.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/router": patch
3+
---
4+
5+
fix(type): allow value from `Params` and `SearchParams` to be optional

src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ declare module "solid-js/web" {
2323
}
2424
}
2525

26-
export type Params = Record<string, string>;
27-
export type SearchParams = Record<string, string | string[]>;
26+
export type Params = Record<string, string | undefined>;
27+
export type SearchParams = Record<string, string | string[] | undefined>;
2828

2929
export type SetParams = Record<
3030
string,

0 commit comments

Comments
 (0)