contexify
Version:
A TypeScript library providing a powerful dependency injection container with context-based IoC capabilities, inspired by LoopBack's Context system.
75 lines (72 loc) • 2.14 kB
TypeScript
import { ah as ConfigurationResolver } from '../index-CSgk2Bzc.js';
import { BindingKey } from '../binding/binding-key.js';
import 'events';
import '../provider/provider.js';
import './value-promise.js';
import 'metarize';
import './json-types.js';
import './debug.js';
/**
* Namespace for context tags
*/
declare namespace ContextTags {
const CLASS = "class";
const PROVIDER = "provider";
const DYNAMIC_VALUE_PROVIDER = "dynamicValueProvider";
/**
* Type of the artifact
*/
const TYPE = "type";
/**
* Namespace of the artifact
*/
const NAMESPACE = "namespace";
/**
* Name of the artifact
*/
const NAME = "name";
/**
* Binding key for the artifact
*/
const KEY = "key";
/**
* Binding tag to associate a configuration binding with the target binding key
*/
const CONFIGURATION_FOR = "configurationFor";
/**
* Binding tag for global interceptors
*/
const GLOBAL_INTERCEPTOR = "globalInterceptor";
/**
* Binding tag for global interceptors to specify sources of invocations that
* the interceptor should apply. The tag value can be a string or string[], such
* as `'route'` or `['route', 'proxy']`.
*/
const GLOBAL_INTERCEPTOR_SOURCE = "globalInterceptorSource";
/**
* Binding tag for group name of global interceptors
*/
const GLOBAL_INTERCEPTOR_GROUP = "globalInterceptorGroup";
}
/**
* Default namespace for global interceptors
*/
declare const GLOBAL_INTERCEPTOR_NAMESPACE = "globalInterceptors";
/**
* Default namespace for local interceptors
*/
declare const LOCAL_INTERCEPTOR_NAMESPACE = "interceptors";
/**
* Namespace for context bindings
*/
declare namespace ContextBindings {
/**
* Binding key for ConfigurationResolver
*/
const CONFIGURATION_RESOLVER: BindingKey<ConfigurationResolver>;
/**
* Binding key for ordered groups of global interceptors
*/
const GLOBAL_INTERCEPTOR_ORDERED_GROUPS: BindingKey<string[]>;
}
export { ContextBindings, ContextTags, GLOBAL_INTERCEPTOR_NAMESPACE, LOCAL_INTERCEPTOR_NAMESPACE };