Skip to content

Commit 7ba6b3f

Browse files
committed
Enhanced defaults for the URL params type
1 parent c944cfd commit 7ba6b3f

File tree

1 file changed

+4
-1
lines changed
  • src/framework/piral-core/src/types

1 file changed

+4
-1
lines changed

src/framework/piral-core/src/types/api.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ export interface RouteBaseProps<UrlParams extends { [K in keyof UrlParams]?: str
9797
/**
9898
* The props used by a page component.
9999
*/
100-
export interface PageComponentProps<T extends { [K in keyof T]?: string } = {}, S = any> extends RouteBaseProps<T, S> {
100+
export interface PageComponentProps<
101+
UrlParams extends { [K in keyof UrlParams]?: string } = Record<string, string>,
102+
UrlState = any,
103+
> extends RouteBaseProps<UrlParams, UrlState> {
101104
/**
102105
* The meta data registered with the page.
103106
*/

0 commit comments

Comments
 (0)