docs: Export missing Plugin types to fix broken links (#1319)
This commit is contained in:
@@ -109,7 +109,7 @@ asynchronously return its
|
|||||||
either from an `async/await` function or wrapped within a promise.
|
either from an `async/await` function or wrapped within a promise.
|
||||||
|
|
||||||
The render hook is called with the
|
The render hook is called with the
|
||||||
[`AsyncPluginRenderContext`](https://deno.land/x/fresh/server.ts?s=AsyncPluginRenderContext)
|
[`PluginAsyncRenderContext`](https://deno.land/x/fresh/server.ts?s=PluginAsyncRenderContext)
|
||||||
object, which contains a `renderAsync()` method. This method must be invoked
|
object, which contains a `renderAsync()` method. This method must be invoked
|
||||||
during the render hook to actually render the page. It is a terminal error to
|
during the render hook to actually render the page. It is a terminal error to
|
||||||
not call the `renderAsync()` method during the render hook.
|
not call the `renderAsync()` method during the render hook.
|
||||||
|
|||||||
@@ -24,6 +24,11 @@ export type {
|
|||||||
MiddlewareHandlerContext,
|
MiddlewareHandlerContext,
|
||||||
PageProps,
|
PageProps,
|
||||||
Plugin,
|
Plugin,
|
||||||
|
PluginAsyncRenderContext,
|
||||||
|
PluginAsyncRenderFunction,
|
||||||
|
PluginRenderContext,
|
||||||
|
PluginRenderFunction,
|
||||||
|
PluginRenderFunctionResult,
|
||||||
PluginRenderResult,
|
PluginRenderResult,
|
||||||
PluginRenderScripts,
|
PluginRenderScripts,
|
||||||
PluginRenderStyleTag,
|
PluginRenderStyleTag,
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ export interface ErrorHandlerContext<State = Record<string, unknown>>
|
|||||||
render: () => Response | Promise<Response>;
|
render: () => Response | Promise<Response>;
|
||||||
state: State;
|
state: State;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ErrorHandler = (
|
export type ErrorHandler = (
|
||||||
req: Request,
|
req: Request,
|
||||||
ctx: ErrorHandlerContext,
|
ctx: ErrorHandlerContext,
|
||||||
@@ -303,6 +304,7 @@ export interface Plugin {
|
|||||||
export interface PluginRenderContext {
|
export interface PluginRenderContext {
|
||||||
render: PluginRenderFunction;
|
render: PluginRenderFunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PluginAsyncRenderContext {
|
export interface PluginAsyncRenderContext {
|
||||||
renderAsync: PluginAsyncRenderFunction;
|
renderAsync: PluginAsyncRenderFunction;
|
||||||
}
|
}
|
||||||
@@ -335,6 +337,7 @@ export interface PluginRenderScripts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type PluginRenderFunction = () => PluginRenderFunctionResult;
|
export type PluginRenderFunction = () => PluginRenderFunctionResult;
|
||||||
|
|
||||||
export type PluginAsyncRenderFunction = () =>
|
export type PluginAsyncRenderFunction = () =>
|
||||||
| PluginRenderFunctionResult
|
| PluginRenderFunctionResult
|
||||||
| Promise<PluginRenderFunctionResult>;
|
| Promise<PluginRenderFunctionResult>;
|
||||||
|
|||||||
Reference in New Issue
Block a user