core/src/reflect/AnnotatedElement.ts

18 lines
911 B
TypeScript
Raw Normal View History

2018-05-16 06:57:12 +00:00
import {
Type,
} from '../type';
import { Annotation } from './Annotation';
export interface AnnotatedElement {
_addAnnotation<AnnotationType extends Annotation>(annotation: AnnotationType): void;
isAnnotationPresent<AnnotationType extends Annotation>(annotationClass: Type<AnnotationType>): boolean;
getOwnAnnotation<AnnotationType extends Annotation>(annotationClass: Type<AnnotationType>): AnnotationType | undefined;
getOwnAnnotations(): Map<Type<any>, Annotation>;
getOwnAnnotationsByType<AnnotationType extends Annotation>(annotationClass: Type<AnnotationType>): AnnotationType[] | undefined;
getAnnotation<AnnotationType extends Annotation>(annotationClass: Type<AnnotationType>): AnnotationType | undefined;
getAnnotations(): Map<Type<any>, Annotation>;
getAnnotationsByType<AnnotationType extends Annotation>(annotationClass: Type<AnnotationType>): AnnotationType[] | undefined;
}