plugin.d.ts — fastify Source File
Architecture documentation for plugin.d.ts, a typescript file in the fastify codebase. 4 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR d7e0d6b7_f402_0b2b_8e73_168514073b2f["plugin.d.ts"] 531c9fc1_aab6_113a_24da_d449700fa629["./instance"] d7e0d6b7_f402_0b2b_8e73_168514073b2f --> 531c9fc1_aab6_113a_24da_d449700fa629 36d8862b_caf4_88a2_ba4d_4f7ed0738291["./utils"] d7e0d6b7_f402_0b2b_8e73_168514073b2f --> 36d8862b_caf4_88a2_ba4d_4f7ed0738291 0ec7ea98_0ca5_a578_7447_eb9a7fa7cc31["./type-provider"] d7e0d6b7_f402_0b2b_8e73_168514073b2f --> 0ec7ea98_0ca5_a578_7447_eb9a7fa7cc31 ee998eba_0ed8_8b67_66d6_d2f80d980a41["./logger"] d7e0d6b7_f402_0b2b_8e73_168514073b2f --> ee998eba_0ed8_8b67_66d6_d2f80d980a41 style d7e0d6b7_f402_0b2b_8e73_168514073b2f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { FastifyInstance } from './instance'
import { RawServerBase, RawRequestDefaultExpression, RawReplyDefaultExpression, RawServerDefault } from './utils'
import { FastifyTypeProvider, FastifyTypeProviderDefault } from './type-provider'
import { FastifyBaseLogger } from './logger'
export type FastifyPluginOptions = Record<string, any>
/**
* FastifyPluginCallback
*
* Fastify allows the user to extend its functionalities with plugins. A plugin can be a set of routes, a server decorator or whatever. To activate plugins, use the `fastify.register()` method.
*/
export type FastifyPluginCallback<
Options extends FastifyPluginOptions = Record<never, never>,
Server extends RawServerBase = RawServerDefault,
TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
Logger extends FastifyBaseLogger = FastifyBaseLogger
> = (
instance: FastifyInstance<Server, RawRequestDefaultExpression<Server>, RawReplyDefaultExpression<Server>, Logger, TypeProvider>,
opts: Options,
done: (err?: Error) => void
) => void
/**
* FastifyPluginAsync
*
* Fastify allows the user to extend its functionalities with plugins. A plugin can be a set of routes, a server decorator or whatever. To activate plugins, use the `fastify.register()` method.
*/
export type FastifyPluginAsync<
Options extends FastifyPluginOptions = Record<never, never>,
Server extends RawServerBase = RawServerDefault,
TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
Logger extends FastifyBaseLogger = FastifyBaseLogger
> = (
instance: FastifyInstance<Server, RawRequestDefaultExpression<Server>, RawReplyDefaultExpression<Server>, Logger, TypeProvider>,
opts: Options
) => Promise<void>
/**
* Generic plugin type.
* @deprecated union type doesn't work well with type inference in TS and is therefore deprecated in favor of explicit types. Use `FastifyPluginCallback` or `FastifyPluginAsync` instead. To activate
* plugins use `FastifyRegister`. https://fastify.dev/docs/latest/Reference/TypeScript/#register
*/
export type FastifyPlugin<Options extends FastifyPluginOptions = Record<never, never>> = FastifyPluginCallback<Options> | FastifyPluginAsync<Options>
Domain
Subdomains
Functions
Dependencies
- ./instance
- ./logger
- ./type-provider
- ./utils
Source
Frequently Asked Questions
What does plugin.d.ts do?
plugin.d.ts is a source file in the fastify codebase, written in typescript. It belongs to the CoreKernel domain, InstanceFactory subdomain.
What functions are defined in plugin.d.ts?
plugin.d.ts defines 1 function(s): instance.
What does plugin.d.ts depend on?
plugin.d.ts imports 4 module(s): ./instance, ./logger, ./type-provider, ./utils.
Where is plugin.d.ts in the architecture?
plugin.d.ts is located at types/plugin.d.ts (domain: CoreKernel, subdomain: InstanceFactory, directory: types).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free