import { ClassConstructor } from '../../types'; import 'reflect-metadata'; import { Field, FieldType } from '../types'; export declare const fieldsMetaData: unique symbol; export declare function FieldMeta(options: Field): PropertyDecorator; /** * Retrieves the fields metadata from a class targetClass. * * This function uses reflection to access the metadata associated with the given targetClass class. * It returns an object where the keys are property names, and the values are objects containing the type, name, and any additional options defined in the field metadata. * * @param {any} targetClass - The target class or instance from which to retrieve the metadata. * @returns {Record} An object mapping property names to their corresponding metadata, which includes the type and other options. * @example * ```typescript * class MyClass { * @FieldMeta({ type: 'string' }) myField: string; * } * const fields = getFieldsFromClass(MyClass); * console.log(fields); // Output: { myField: { name: 'myField', type: 'string' } } * ``` */ export declare function getFieldsFromClass(targetClass: ClassConstructor): Record; /*** * Retrieves the fields metadata from a class instance. * @param {T} instance - The instance of the class from which to retrieve the metadata. * @returns {Record} An object mapping property names to their corresponding metadata, which includes the type and other options. */ export declare function getFields(instance: InstanceType): Record;