Page Contents
Home > @loopback/core > extensionPoint
extensionPoint() function
Decorate a class as a named extension point. If the decoration is not present, the name of the class will be used.
Signature:
export declare function extensionPoint(name: string, ...specs: BindingSpec[]): ClassDecorator;
Parameters
| Parameter | Type | Description |
|---|---|---|
| name | string | Name of the extension point |
| specs | [BindingSpec](/doc/en/lb4/apidocs.context.bindingspec.html)\[\] |
Returns:
ClassDecorator
Example
import {extensionPoint} from '@loopback/core';
@extensionPoint(GREETER_EXTENSION_POINT_NAME)
export class GreetingService {
// ...
}