import { CustomDeserializerParams, CustomSerializerParams } from './metadata'; import { OptionsBase } from './options-base'; import { MaybeTypeThunk, Typelike } from './type-descriptor'; import { IndexedObject } from './types'; export interface IJsonMemberOptions extends OptionsBase { /** * Sets the constructor of the property. * Optional with ReflectDecorators. */ constructor?: Typelike | null; /** When set, indicates that the member must be present when deserializing. */ isRequired?: boolean | null; /** When set, a default value is emitted if the property is uninitialized/undefined. */ emitDefaultValue?: boolean | null; /** When set, the key on the JSON that should be used instead of the class property name. */ name?: string | null; /** * When set, this deserializer will be used to deserialize the member. The callee must assure * the correct type. */ deserializer?: ((json: any, params: CustomDeserializerParams) => any) | null; /** When set, this serializer will be used to serialize the member. */ serializer?: ((value: any, params: CustomSerializerParams) => any) | null; } /** * Specifies that a property is part of the object when serializing. * Requires ReflectDecorators. */ export declare function jsonMember(prototype: IndexedObject, propertyKey: string | symbol): void; /** * Specifies that a property is part of the object when serializing, with additional options. * Requires ReflectDecorators. */ export declare function jsonMember(options: IJsonMemberOptions): PropertyDecorator; /** * Specifies that a property is part of the object when serializing, with a defined type and extra * options. */ export declare function jsonMember(type: MaybeTypeThunk, options?: IJsonMemberOptions): PropertyDecorator; //# sourceMappingURL=json-member.d.ts.map