import { ViewConfig } from './common'; import { Injector, ProviderArg } from '../di'; import { ViewContainer } from './ViewContainer'; export interface ViewFactoryArgs { config: ViewConfig; injector?: Injector; } /** * Responsible for creating view containers from view configurations. * @export * @class ViewFactory */ export declare class ViewFactory { protected _injector: Injector; protected _ViewContainer: typeof ViewContainer; /** * Creates a view container from the given configuration. * @template T The component type. * @param {ViewFactoryArgs} args * @returns {ViewContainer} */ create(args: ViewFactoryArgs): ViewContainer; /** * Gets the token from a view config. If using `useClass` the class will be used as the token. * Any other type will require token to be provided. * @param {ViewConfig} config * @returns {*} */ getTokenFrom(config: ViewConfig): any; /** * Resolves a config property by looking at the view config then the components metadata config. * @template T The type of the value expected. * @param {ViewConfig} config * @param {string} path * @returns {(T|null)} */ resolveConfigProperty(config: ViewConfig, path: string): T | null; /** * Resolves a config property from the tokens metadata. * @template T The return type. * @param {*} token * @param {string} path * @returns {(T|null)} */ resolveMetaConfigProperty(token: any, path: string): T | null; destroy(): void; protected _getViewContainerProvider(config: ViewConfig): ProviderArg; }