alpha-dic
Version:
Asynchronous dependency injection container
11 lines (10 loc) • 524 B
TypeScript
import { Predicate } from "predicates/types";
export declare function createAnnotationFactory<T extends (...args: any[]) => any>(annotationName: string, extraAttributesFactory?: T): AnnotationFactory<Parameters<T>, {
name: string;
} & ReturnType<T>>;
export interface AnnotationFactory<TParams extends any[], TAnnotation> {
(...params: TParams): TAnnotation;
predicate: (value: any) => boolean;
andPredicate: (extraPredicate: Predicate) => Predicate;
decorator: (...params: TParams) => ClassDecorator;
}