UNPKG

795 BTypeScriptView Raw
1import { FastifyRouteConfig } from './route'
2import { ContextConfigDefault } from './utils'
3
4// eslint-disable-next-line @typescript-eslint/no-empty-interface
5export interface FastifyContextConfig {
6}
7
8/**
9 * Route context object. Properties defined here will be available in the route's handler
10 */
11export interface FastifyRequestContext<ContextConfig = ContextConfigDefault> {
12 /**
13 * @deprecated Use Request#routeOptions#config or Request#routeOptions#schema instead
14 */
15 config: FastifyContextConfig & FastifyRouteConfig & ContextConfig;
16}
17
18export interface FastifyReplyContext<ContextConfig = ContextConfigDefault> {
19 /**
20 * @deprecated Use Reply#routeOptions#config or Reply#routeOptions#schema instead
21 */
22 config: FastifyContextConfig & FastifyRouteConfig & ContextConfig;
23}