UNPKG

2.22 kBPlain TextView Raw
1// Copyright IBM Corp. and LoopBack contributors 2017,2020. All Rights Reserved.
2// Node module: @loopback/context
3// This file is licensed under the MIT License.
4// License text available at https://opensource.org/licenses/MIT
5
6/**
7 * Facilities to manage artifacts and their dependencies using {@link Context}
8 * in your Node.js applications. It can be used independent of the LoopBack
9 * framework.
10 *
11 * @remarks
12 * This package exposes TypeScript/JavaScript APIs and decorators to register
13 * artifacts, declare dependencies, and resolve artifacts by keys. The
14 * {@link Context} also serves as an IoC container to support dependency
15 * injection.
16 * Context and Binding are the two core concepts. A context is a registry of
17 * bindings and each binding represents a resolvable artifact by the key.
18 *
19 * - Bindings can be fulfilled by a constant, a factory function, a class, or a
20 * provider.
21 * - Bindings can be grouped by tags and searched by tags.
22 * - Binding scopes can be used to control how a resolved binding value is
23 * shared.
24 * - Bindings can be resolved synchronously or asynchronously.
25 * - Provide {@link inject | @inject} and other variants of decorators to
26 * express dependencies.
27 * - Support Constructor, property, and method injections.
28 * - Allow contexts to form a hierarchy to share or override bindings.
29 *
30 * @pakageDocumentation
31 */
32
33export * from '@loopback/metadata';
34export * from './binding';
35export * from './binding-config';
36export * from './binding-decorator';
37export * from './binding-filter';
38export * from './binding-inspector';
39export * from './binding-key';
40export * from './binding-sorter';
41export * from './context';
42export * from './context-event';
43export * from './context-observer';
44export * from './context-subscription';
45export * from './context-view';
46export * from './inject';
47export * from './inject-config';
48export * from './interception-proxy';
49export * from './interceptor';
50export * from './interceptor-chain';
51export * from './invocation';
52export * from './json-types';
53export * from './keys';
54export * from './provider';
55export * from './resolution-session';
56export * from './resolver';
57export * from './unique-id';
58export * from './value-promise';