import { TokenId } from '@tsdi/ioc'; import { BuildContext, IBuildOption, IBuildContext } from '@tsdi/boot'; import { IComponentRef, ITemplateRef } from './ComponentRef'; import { IComponentMetadata } from './decorators/IComponentMetadata'; import { IComponentReflect } from './IComponentReflect'; import { ComponentProvider } from './ComponentProvider'; export interface IComponentOption extends IBuildOption { /** * build as attr or not. */ attr?: boolean; /** * sub build or not. */ sub?: boolean; } export interface IComponentContext extends IBuildContext { readonly name: string; getResultRef(): IComponentRef | ITemplateRef; getTargetReflect(): IComponentReflect; /** * annoation metadata. */ getAnnoation(): IComponentMetadata; /** * component instance. */ getComponent(): T; getComponentContext(): IComponentContext; /** * template scope. */ getScope(): T; getScopes(): any[]; readonly componentProvider: ComponentProvider; readonly componentDecorator: string; } export declare const CTX_COMPONENT_CONTEXT: TokenId; export declare class ComponentContext extends BuildContext implements IComponentContext { readonly name:any; getResultRef(): any; getTargetReflect(): IComponentReflect; /** * annoation metadata. */ getAnnoation(): IComponentMetadata; /** * component instance. * * @readonly * @type {*} * @memberof ComponentContext */ getComponent(): T; getComponentContext(): IComponentContext; /** * template scope. * * @readonly * @memberof ComponentContext */ getScope(): T; getScopes(): any[]; readonly componentProvider:ComponentProvider; protected getComponentProvider(): ComponentProvider; readonly componentDecorator:string; static ρAnn(): any; }