Function defineInitialize
- defineInitialize<NeedContext, PluginContext, StartContext>(initialize: initialize<NeedContext, PluginContext, StartContext>): typeof initialize
-
Type Parameters
-
NeedContext extends Record<string | symbol, any>
-
PluginContext extends Record<string | symbol, any>
-
StartContext extends Record<string | symbol, any>
Parameters
-
initialize: initialize<NeedContext, PluginContext, StartContext>
- defineInitialize<NeedContext, StartContext>(initialize: initialize_B<NeedContext, StartContext>): typeof initialize
-
Type Parameters
-
NeedContext extends Record<string | symbol, any>
-
StartContext extends Record<string | symbol, any>
- defineInitialize<NeedContext>(initialize: initialize_C<NeedContext>): typeof initialize
-
Type Parameters
-
NeedContext extends Record<string | symbol, any>
Typed helper to define the
initialize()function.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.