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

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

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

## core package

The core foundation for LoopBack 4. It can also serve as the platform to build large-scale Node.js applications and frameworks.

## Remarks

For examples of how to leverage `@loopback/core` to build composable and extensible projects, check out the [core tutorial](https://loopback.io/doc/en/lb4/core-tutorial.html)<!-- -->.

## Classes

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

Class


</th><th>

Description


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

[Application](./core.application.md)


</td><td>

Application is the container for various types of artifacts, such as components, servers, controllers, repositories, datasources, connectors, and models.


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

[LifeCycleObserverRegistry](./core.lifecycleobserverregistry.md)


</td><td>

A context-based registry for life cycle observers


</td></tr>
</tbody></table>

## Functions

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

Function


</th><th>

Description


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

[addExtension(context, extensionPointName, extensionClass, options)](./core.addextension.md)


</td><td>

Register an extension for the given extension point to the context


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

[asLifeCycleObserver(binding)](./core.aslifecycleobserver.md)


</td><td>

A `BindingTemplate` function to configure the binding as life cycle observer by tagging it with `CoreTags.LIFE_CYCLE_OBSERVER`<!-- -->.


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

[asService(serviceInterface)](./core.asservice.md)


</td><td>

Create a binding template for a service interface


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

[createServiceBinding(cls, options)](./core.createservicebinding.md)


</td><td>

Create a service binding from a class or provider


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

[extensionFilter(extensionPointNames)](./core.extensionfilter.md)


</td><td>

A factory function to create binding filter for extensions of a named extension point


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

[extensionFor(extensionPointNames)](./core.extensionfor.md)


</td><td>

A factory function to create binding template for extensions of the given extension point


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

[extensionPoint(name, specs)](./core.extensionpoint.md)


</td><td>

Decorate a class as a named extension point. If the decoration is not present, the name of the class will be used.


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

[extensions(extensionPointName, metadata)](./core.extensions.md)


</td><td>

Shortcut to inject extensions for the given extension point.


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

[filterByServiceInterface(serviceInterface)](./core.filterbyserviceinterface.md)


</td><td>

Create a binding filter by service class


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

[isLifeCycleObserver(obj)](./core.islifecycleobserver.md)


</td><td>

Test if an object implements LifeCycleObserver


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

[isLifeCycleObserverClass(ctor)](./core.islifecycleobserverclass.md)


</td><td>

Test if a class implements LifeCycleObserver


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

[lifeCycleObserver(group, specs)](./core.lifecycleobserver.md)


</td><td>

Sugar decorator to mark a class as life cycle observer


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

[mountComponent(app, component)](./core.mountcomponent.md)


</td><td>

Mount a component to an Application.


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

[service(serviceInterface, metadata)](./core.service.md)


</td><td>

`@service` injects a service instance that matches the class or interface.


</td></tr>
</tbody></table>

## Interfaces

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

Interface


</th><th>

Description


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

[ApplicationConfig](./core.applicationconfig.md)


</td><td>

Configuration for application


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

[ApplicationMetadata](./core.applicationmetadata.md)


</td><td>

Type description for `package.json`


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

[ClassMap](./core.classmap.md)


</td><td>

A map of classes to be bound to a context


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

[Component](./core.component.md)


</td><td>

A component declares a set of artifacts so that they can be contributed to an application as a group


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

[LifeCycleObserver](./core.lifecycleobserver.md)


</td><td>

Observers to handle life cycle init/start/stop events


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

[ProviderMap](./core.providermap.md)


</td><td>

A map of provider classes to be bound to a context


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

[Server](./core.server.md)


</td><td>

Defines the requirements to implement a Server for LoopBack applications: start() : Promise<void> stop() : Promise<void> It is recommended that each Server implementation creates its own child Context, which inherits from the parent Application context. This way, any Server-specific bindings will remain local to the Server instance, and will avoid polluting its parent module scope.


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

[ServiceOptions](./core.serviceoptions.md)


</td><td>

Options to register a service binding


</td></tr>
</tbody></table>

## Namespaces

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

Namespace


</th><th>

Description


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

[CoreBindings](./core.corebindings.md)


</td><td>

Namespace for core binding keys


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

[CoreTags](./core.coretags.md)


</td><td>


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

[extensions](./core.extensions.md)


</td><td>


</td></tr>
</tbody></table>

## Variables

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

Variable


</th><th>

Description


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

[DEFAULT\_ORDERED\_GROUPS](./core.default_ordered_groups.md)


</td><td>


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

[lifeCycleObserverFilter](./core.lifecycleobserverfilter.md)


</td><td>

Find all life cycle observer bindings. By default, a binding tagged with `CoreTags.LIFE_CYCLE_OBSERVER`<!-- -->. It's used as `BindingFilter`<!-- -->.


</td></tr>
</tbody></table>

## Type Aliases

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

Type Alias


</th><th>

Description


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

[ControllerClass](./core.controllerclass.md)


</td><td>


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

[LifeCycleObserverGroup](./core.lifecycleobservergroup.md)


</td><td>

A group of life cycle observers


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

[LifeCycleObserverOptions](./core.lifecycleobserveroptions.md)


</td><td>


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

[MixinTarget](./core.mixintarget.md)


</td><td>

A replacement for `typeof Target` to be used in mixin class definitions. This is a workaround for TypeScript limitation described in - https://github.com/microsoft/TypeScript/issues/17293 - https://github.com/microsoft/TypeScript/issues/17744 - https://github.com/microsoft/TypeScript/issues/36060


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

[ServiceInterface](./core.serviceinterface.md)


</td><td>

Representing an interface for services. In TypeScript, the `interface` does not have reflections at runtime. We use a string, a symbol or a Function as the type for the service interface.


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

[ServiceOrProviderClass](./core.serviceorproviderclass.md)


</td><td>


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

[ShutdownOptions](./core.shutdownoptions.md)


</td><td>

Options to set up application shutdown


</td></tr>
</tbody></table>

