Page Contents

Home > @loopback/core > addExtension

addExtension() function

Register an extension for the given extension point to the context

Signature:

export declare function addExtension(context: Context, extensionPointName: string, extensionClass: Constructor<unknown>, options?: BindingFromClassOptions): Binding<unknown>;

Parameters

Parameter Type Description
context Context Context object
extensionPointName string Name of the extension point
extensionClass Constructor<unknown> Class or a provider for an extension
options BindingFromClassOptions (Optional) Options Options for the creation of binding from class

Returns:

Binding<unknown>