@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
91 lines (48 loc) • 1.42 kB
Markdown
---
lang: en
title: 'API docs: core.extensionpoint'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/core
permalink: /doc/en/lb4/apidocs.core.extensionpoint.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/core](./core.md) > [extensionPoint](./core.extensionpoint.md)
## 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:**
```typescript
export declare function extensionPoint(name: string, ...specs: BindingSpec[]): ClassDecorator;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
name
</td><td markdown="1">
string
</td><td markdown="1">
Name of the extension point
</td></tr>
<tr><td markdown="1">
specs
</td><td markdown="1">
[BindingSpec](./context.bindingspec.md)<!-- -->\[\]
</td><td markdown="1">
</td></tr>
</tbody></table>
**Returns:**
ClassDecorator
## Example
```ts
import {extensionPoint} from '@loopback/core';
@extensionPoint(GREETER_EXTENSION_POINT_NAME)
export class GreetingService {
// ...
}
```