getHandler() — fastify Function Reference
Architecture documentation for the getHandler() function in request.test-d.ts from the fastify codebase.
Entity Profile
Dependency Diagram
graph TD 8b6670f4_2ef2_ec64_a2c2_78ba77b162da["getHandler()"] 01a047b2_eacc_37c4_06c9_06b0e54cb0e2["request.test-d.ts"] 8b6670f4_2ef2_ec64_a2c2_78ba77b162da -->|defined in| 01a047b2_eacc_37c4_06c9_06b0e54cb0e2 style 8b6670f4_2ef2_ec64_a2c2_78ba77b162da fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
test/types/request.test-d.ts lines 63–102
const getHandler: RouteHandler = function (request, _reply) {
expectType<string>(request.url)
expectType<string>(request.originalUrl)
expectType<string>(request.method)
expectType<Readonly<RequestRouteOptions>>(request.routeOptions)
expectType<boolean>(request.is404)
expectType<string>(request.hostname)
expectType<string>(request.host)
expectType<number>(request.port)
expectType<string>(request.ip)
expectType<string[] | undefined>(request.ips)
expectType<RawRequestDefaultExpression>(request.raw)
expectType<RequestBodyDefault>(request.body)
expectType<RequestParamsDefault>(request.params)
expectType<ContextConfigDefault & FastifyRouteConfig & FastifyContextConfig>(request.routeOptions.config)
expectType<FastifySchema | undefined>(request.routeOptions.schema)
expectType<RouteHandlerMethod>(request.routeOptions.handler)
expectType<string | undefined>(request.routeOptions.url)
expectType<string | undefined>(request.routeOptions.version)
expectType<RequestHeadersDefault & RawRequestDefaultExpression['headers']>(request.headers)
request.headers = {}
expectType<RequestQuerystringDefault>(request.query)
expectType<string>(request.id)
expectType<FastifyBaseLogger>(request.log)
expectType<RawRequestDefaultExpression['socket']>(request.socket)
expectType<Error & { validation: any; validationContext: string } | undefined>(request.validationError)
expectType<FastifyInstance>(request.server)
expectAssignable<(httpPart: HTTPRequestPart) => ExpectedGetValidationFunction>(request.getValidationFunction)
expectAssignable<(schema: { [key: string]: unknown }) => ExpectedGetValidationFunction>(request.getValidationFunction)
expectAssignable<
(input: { [key: string]: unknown }, schema: { [key: string]: unknown }, httpPart?: HTTPRequestPart) => boolean
>(request.validateInput)
expectAssignable<(input: { [key: string]: unknown }, httpPart?: HTTPRequestPart) => boolean>(request.validateInput)
expectType<string>(request.getDecorator<string>('foo'))
expectType<void>(request.setDecorator('foo', 'hello'))
expectType<void>(request.setDecorator<string>('foo', 'hello'))
expectError(request.setDecorator<string>('foo', true))
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does getHandler() do?
getHandler() is a function in the fastify codebase, defined in test/types/request.test-d.ts.
Where is getHandler() defined?
getHandler() is defined in test/types/request.test-d.ts at line 63.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free