1 | import { ComponentRef, Type } from '@angular/core';
|
2 | import { InjectionService } from './injection.service';
|
3 | export interface PartialBindings {
|
4 | inputs?: object;
|
5 | outputs?: object;
|
6 | }
|
7 | export declare abstract class InjectionRegisteryService<T = any> {
|
8 | injectionService: InjectionService;
|
9 | protected abstract type: Type<T>;
|
10 | protected defaults: PartialBindings;
|
11 | protected components: Map<any, Array<ComponentRef<T>>>;
|
12 | constructor(injectionService: InjectionService);
|
13 | getByType(type?: Type<T>): ComponentRef<T>[];
|
14 | create(bindings: object): ComponentRef<T>;
|
15 | createByType(type: Type<T>, bindings: PartialBindings): ComponentRef<T>;
|
16 | destroy(instance: ComponentRef<T>): void;
|
17 | destroyAll(): void;
|
18 | destroyByType(type: Type<T>): void;
|
19 | protected injectComponent(type: Type<T>, bindings: PartialBindings): ComponentRef<T>;
|
20 | protected assignDefaults(bindings: PartialBindings): PartialBindings;
|
21 | protected register(type: Type<T>, component: ComponentRef<T>): void;
|
22 | }
|