refactor: share the PRECHECK type at the top level
This commit is contained in:
parent
41c7802a36
commit
18b58ba94a
4 changed files with 9 additions and 9 deletions
|
@ -56,6 +56,12 @@ export const DEFAULT_SERVER_OPTIONS: SERVER_OPTIONS = {
|
|||
logging: true
|
||||
};
|
||||
|
||||
/** A `PRECHECK` must take a `Request` and `meta` data and return a `Response` IF THERE IS A PROBLEM. */
|
||||
export type PRECHECK = (
|
||||
request: Request,
|
||||
meta: Record<string, any>
|
||||
) => undefined | Response | Promise<undefined | Response>;
|
||||
|
||||
/**
|
||||
* @method LOG_REQUEST Default request logger.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue