Type alias initialize<NeedContext, PluginContext, StartContext>
initialize<in NeedContext, PluginContext, StartContext>: ((context: NeedContext) => [PluginContext, StartContext?])
Type Parameters
-
in NeedContext extends Record<string | symbol, any>
-
PluginContext extends Record<string | symbol, any> | undefined
-
StartContext extends Record<string | symbol, any> | undefined
Type declaration
-
- (context: NeedContext): [PluginContext, StartContext?]
-
Returns [PluginContext, StartContext?]
initialize()
function gets thecontext
it needs from the application, and returns two things:PluginContext
which will be added to the application instance.StartContext
which will be passed to thestart()
function if present.These types are inferred automatically so you don't need to specify them explicitly.