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 thecontextit needs from the application, and returns two things:PluginContextwhich will be added to the application instance.StartContextwhich will be passed to thestart()function if present.These types are inferred automatically so you don't need to specify them explicitly.