import { Annotation, IAnnotation } from "@alterior/annotations"; export type Constructor = new (...args: any[]) => T; export type AbstractConstructor = abstract new (...args: any[]) => T; export type AnyConstructor = Constructor | AbstractConstructor; export type Visibility = 'private' | 'public' | 'protected'; /** * Represents a property on a class. A property can also be a field or a method. */ export declare class Property { private _type; private _name; private _isStatic; constructor(_type: Constructor, _name: string, _isStatic?: boolean); private _visibility; defineMetadata(key: string, value: string): void; getMetadata(key: string): any; deleteMetadata(key: string): void; private _valueType; get valueType(): Type | undefined; get isStatic(): boolean; protected get type(): Constructor; private _annotations; get annotations(): IAnnotation[]; annotationsOfType(type: Constructor): T[]; annotationOfType(type: Constructor): T; private _descriptor; get descriptor(): PropertyDescriptor | undefined; get name(): string; get visibility(): Visibility; } /** * Represents a method on a class. A method can be a static or instance method, and has a set of parameters * and a return type. */ export declare class Method extends Property { constructor(type: Constructor, name: string, isStatic?: boolean); private _returnType; get returnType(): Type | undefined; private _parameterTypes; get parameterTypes(): (Type | undefined)[]; get implementation(): Function; private _parameterNames; get parameterNames(): string[]; get parameters(): Parameter[]; private _parameterAnnotations; get parameterAnnotations(): IAnnotation[][]; } export declare class Field extends Property { constructor(type: Constructor, name: string, isStatic?: boolean); } export declare class ConstructorMethod extends Method { constructor(type: Constructor); private _ctorParameterAnnotations; get parameterAnnotations(): IAnnotation[][]; } export declare class Parameter { private _method; private _index; private _name; constructor(_method: Method, _index: number, _name?: string | undefined); get annotations(): IAnnotation[]; annotationsOfType(type: Constructor): T[]; annotationOfType(type: Constructor): T; protected get method(): Method; get valueType(): Type | undefined; get index(): number; get name(): string | undefined; } /** * Represents a class Type and it's metadata */ export declare class Type { private _class; constructor(_class: Constructor); private _methodNames; private _fieldNames; get name(): string; getMetadata(key: string): void; defineMetadata(key: string, value: any): void; deleteMetadata(key: string): void; private _metadataKeys; get metadataKeys(): string[]; private _annotations; /** * Get all annotations attached to this class */ get annotations(): IAnnotation[]; annotationsOfType(type: Constructor): T[]; annotationOfType(type: Constructor): T; private _staticPropertyNames; private _staticMethodNames; private _staticFieldNames; get staticPropertyNames(): string[]; get staticMethodNames(): string[]; get staticFieldNames(): string[]; private _staticMethods; get staticMethods(): Method[]; private _staticFields; get staticFields(): Field[]; private _staticProperties; get staticProperties(): Property[]; private _propertyNames; get propertyNames(): string[]; get methodNames(): string[]; get fieldNames(): string[]; private _ctor; get constructorMethod(): ConstructorMethod; private _methods; get methods(): Method[]; private _properties; get properties(): Property[]; private _fields; get fields(): Field[]; get base(): Type; } export declare class Reflector { getTypeFromInstance(instance: T): Type; getTypeFromClass(typeClass: Constructor): Type; } //# sourceMappingURL=reflector.d.ts.map