import { ITypeDecorator, Registration, Type } from '@ts-ioc/core'; import { AspectMetadata } from '../metadatas'; /** * Aspect decorator * * @export * @interface IAspectDecorator * @extends {ITypeDecorator} */ export interface IAspectDecorator extends ITypeDecorator { /** * Aspect decorator, define for class. use to define class as aspect. it can setting provider to some token, singleton or not. * * @Aspect * * @param {string} annotation set pointcut in the class with the annotation decorator only. * @param {(Type | Type[])>} [within] set pointcut in the class with the annotation decorator only. * @param {(Registration | symbol | string)} [provide] define this class provider for provide. * @param {string} [alias] define this class provider with alias for provide. * @param {boolean} [singlton] define this class as singlton. * @param {number} [cache] define class cahce expris when is not singlton. */ (annotation: string, within?: Type | Type[], provide?: Registration | symbol | string, alias?: string, singlton?: boolean, cache?: number): ClassDecorator; /** * Aspect decorator, define for class. use to define the class. it can setting provider to some token, singleton or not. * * @Aspect * * @param {AspectMetadata} [metadata] metadata map. */ (metadata?: AspectMetadata): ClassDecorator; } /** * Aspect decorator. define aspect service. * * @Aspect */ export declare const Aspect: IAspectDecorator;