UNPKG

@creamapi/cream

Version:

Concise REST API Maker - An extension library for express to create REST APIs faster

22 lines (21 loc) 860 B
export declare const SERIALIZER_META_INFO_METADATA_KEY: unique symbol; /** * @internal * This class is used to store meta information for * the serializers that will be used to make decisions * when serializing objects */ export declare class SerializerMetaInfo { private attributes; addAttribute(attribute: string): void; hasAttribute(attribute: string): boolean; } /** * Defines a metadata for the attribute that can be used by * serializers to make decisions on serialization. * @example the XML serializer uses the attribute AutoIndex to automatically * add the index of the element as the attribute index in the xml tag * @param attribute the attribute that should be defined * @returns the decorator that will decorate the attribute */ export declare function Meta(attribute: string): (target: any, propertyName: string) => void;