UNPKG

tsioc

Version:

tsioc is AOP, Ioc container, via typescript decorator

25 lines (24 loc) 1.03 kB
import { MethodPropMetadata } from '../metadatas/index'; import { MetadataAdapter, MetadataExtends } from './DecoratorFactory'; export declare type MethodPropDecorator = (target: Object, propertyKey: string | symbol, descriptor?: TypedPropertyDescriptor<any>) => void; /** * method and Property decorator. * * @export * @interface IMethodPropDecorator */ export interface IMethodPropDecorator<T extends MethodPropMetadata> { (metadata?: T): MethodPropDecorator; (target: object, propertyKey: string | symbol, descriptor?: TypedPropertyDescriptor<any>): void; } /** * create method or property decorator * * @export * @template T * @param {string} name * @param {MetadataAdapter} [adapter] metadata adapter * @param {MetadataExtends<T>} [metadataExtends] add extents for metadata. * @returns {IMethodPropDecorator<T>} */ export declare function createMethodPropDecorator<T extends MethodPropMetadata>(name: string, adapter?: MetadataAdapter, metadataExtends?: MetadataExtends<T>): IMethodPropDecorator<T>;