Skip to content

Commit e960194

Browse files
committed
fix(type): allow value from Params and SearchParams to be optional
There is no way for us to know if these params is obligated or optional from the input. So it is safer to assume that they can be undefined.
1 parent 3c214ce commit e960194

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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)