@itrocks/reflect
Version:
Runtime introspection of TypeScript classes and their properties, including property type
15 lines (14 loc) • 565 B
TypeScript
import { KeyOf, Type } from '@itrocks/class-type';
import { CollectionType } from '@itrocks/property-type';
import { ReflectClass } from './class';
export declare class ReflectProperty<T extends object> {
#private;
readonly name: KeyOf<T>;
constructor(object: T | ReflectClass<T> | Type<T>, name: KeyOf<T>);
get class(): ReflectClass<T>;
get collectionType(): CollectionType;
get defaultValue(): any;
get object(): T | undefined;
get type(): import("@itrocks/property-type").PropertyType;
get value(): T[KeyOf<T>] | undefined;
}