feat: allow passing additional args to HandlerContext.render (#82)
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
This commit is contained in:
co-authored by
Luca Casonato
parent
6abf62c832
commit
788a85c431
@@ -1,4 +1,4 @@
|
||||
export interface PageProps {
|
||||
export interface PageProps<T extends Record<string, unknown>> {
|
||||
/** The URL of the request that resulted in this page being rendered. */
|
||||
url: URL;
|
||||
|
||||
@@ -15,6 +15,12 @@ export interface PageProps {
|
||||
* be `{ path: [ 'bar', 'baz' ] }`.
|
||||
*/
|
||||
params: Record<string, string | string[]>;
|
||||
|
||||
/**
|
||||
* Additional data passed into `HandlerContext.render`. Not present by
|
||||
* default.
|
||||
*/
|
||||
renderData?: T;
|
||||
}
|
||||
|
||||
export interface PageConfig {
|
||||
|
||||
Reference in New Issue
Block a user