refactor: share the PRECHECK type at the top level

This commit is contained in:
Andy Burke 2025-08-08 17:38:15 -07:00
parent 41c7802a36
commit 18b58ba94a
4 changed files with 9 additions and 9 deletions

View file

@ -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.
*