1.16 kBTypeScriptView Raw
1import { interfaces } from 'inversify';
2export declare const ContributionProvider: unique symbol;
3export interface ContributionProvider<T extends object> {
4 /**
5 * @param recursive `true` if the contributions should be collected from the parent containers as well. Otherwise, `false`. It is `false` by default.
6 */
7 getContributions(recursive?: boolean): T[];
9export declare type Bindable = interfaces.Bind | interfaces.Container;
10export declare namespace Bindable {
11 function isContainer(arg: Bindable): arg is interfaces.Container;
13export declare function bindContributionProvider(bindable: Bindable, id: symbol): void;
15 * Helper function to bind a service to a list of contributions easily.
16 * @param bindable a Container or the bind function directly.
17 * @param service an already bound service to refer the contributions to.
18 * @param contributions array of contribution identifiers to bind the service to.
19 */
20export declare function bindContribution(bindable: Bindable, service: interfaces.ServiceIdentifier<any>, contributions: interfaces.ServiceIdentifier<any>[]): void;
21//# sourceMappingURL=contribution-provider.d.ts.map
\No newline at end of file