tsioc
Version:
tsioc is AOP, Ioc container, via typescript decorator
25 lines (24 loc) • 1.06 kB
TypeScript
import { TypeMetadata } from '../metadatas/index';
import { MetadataAdapter, MetadataExtends } from './DecoratorFactory';
export declare type MethodPropParamDecorator = (target: Object, propertyKey: string | symbol, descriptor?: number | TypedPropertyDescriptor<any>) => void;
/**
* method and Property decorator.
*
* @export
* @interface IMethodPropParamDecorator
*/
export interface IMethodPropParamDecorator<T extends TypeMetadata> {
(metadata?: T): MethodPropParamDecorator;
(target: object, propertyKey: string | symbol, descriptor?: number | 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 {IMethodPropParamDecorator<T>}
*/
export declare function createMethodPropParamDecorator<T extends TypeMetadata>(name: string, adapter?: MetadataAdapter, metadataExtends?: MetadataExtends<T>): IMethodPropParamDecorator<T>;