import { Binding, BoundValue, Constructor, Provider } from '@loopback/context'; import { Application, ControllerClass, ServiceOrProviderClass } from './application'; import { LifeCycleObserver } from './lifecycle'; import { Server } from './server'; /** * A map of provider classes to be bound to a context */ export interface ProviderMap { [key: string]: Constructor>; } /** * A map of classes to be bound to a context */ export interface ClassMap { [key: string]: Constructor; } /** * A component declares a set of artifacts so that they can be contributed to * an application as a group */ export interface Component { /** * An array of controller classes */ controllers?: ControllerClass[]; /** * A map of providers to be bound to the application context * * @example * ```ts * { * 'authentication.strategies.ldap': LdapStrategyProvider * } * ``` */ providers?: ProviderMap; /** * A map of classes to be bound to the application context. * * @example * ```ts * { * 'rest.body-parsers.xml': XmlBodyParser * } * ``` */ classes?: ClassMap; /** * A map of name/class pairs for servers */ servers?: { [name: string]: Constructor; }; lifeCycleObservers?: Constructor[]; /** * An array of service or provider classes */ services?: ServiceOrProviderClass[]; /** * An array of bindings to be aded to the application context. * * @example * ```ts * const bindingX = Binding.bind('x').to('Value X'); * this.bindings = [bindingX] * ``` */ bindings?: Binding[]; /** * An array of component classes */ components?: Constructor[]; /** * Other properties */ [prop: string]: any; } /** * Mount a component to an Application. * * @param app - Application * @param component - Component instance */ export declare function mountComponent(app: Application, component: Component): void;