mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
1.1 KiB
1.1 KiB
Home > kibana-plugin-server > IContextContainer > createHandler
IContextContainer.createHandler() method
Create a new handler function pre-wired to context for the plugin.
Signature:
createHandler(pluginOpaqueId: PluginOpaqueId, handler: THandler): (...rest: HandlerParameters<THandler>) => ShallowPromise<ReturnType<THandler>>;
Parameters
Parameter | Type | Description |
---|---|---|
pluginOpaqueId | PluginOpaqueId |
The plugin opaque ID for the plugin that registers this handler. |
handler | THandler |
Handler function to pass context object to. |
Returns:
(...rest: HandlerParameters<THandler>) => ShallowPromise<ReturnType<THandler>>
A function that takes THandlerParameters
, calls handler
with a new context, and returns a Promise of the handler
return value.