---
lang: en
title: 'API docs: core.addextension'
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.addextension.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/core](./core.md) &gt; [addExtension](./core.addextension.md)

## addExtension() function

Register an extension for the given extension point to the context

**Signature:**

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

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

context


</td><td>

[Context](./context.context.md)


</td><td>

Context object


</td></tr>
<tr><td>

extensionPointName


</td><td>

string


</td><td>

Name of the extension point


</td></tr>
<tr><td>

extensionClass


</td><td>

[Constructor](./context.constructor.md)<!-- -->&lt;unknown&gt;


</td><td>

Class or a provider for an extension


</td></tr>
<tr><td>

options


</td><td>

[BindingFromClassOptions](./context.bindingfromclassoptions.md)


</td><td>

_(Optional)_ Options Options for the creation of binding from class


</td></tr>
</tbody></table>
**Returns:**

[Binding](./context.binding.md)<!-- -->&lt;unknown&gt;


