/** * @packageDocumentation * @module Decorators */ import { JsonPropertyOrderDecorator } from '../@types'; /** * Decorator that can be used to define ordering (possibly partial) to use when serializing object properties. * Properties included in decorator declaration will be serialized first (in defined order), * followed by any properties not included in the definition. * This decorator definition will override any implicit orderings. * * When used for properties (fields, methods), this decorator applies to values: * so when applied to Iterables and Maps, it will apply to contained values, not the container. * * @example * ```typescript * @JsonPropertyOrder({value: ['email', 'lastname']}) * class User { * @JsonProperty() @JsonClassType({type: () => [String]}) * email: string; * @JsonProperty() @JsonClassType({type: () => [Number]}) * id: number; * @JsonProperty() @JsonClassType({type: () => [String]}) * firstname: string; * @JsonProperty() @JsonClassType({type: () => [String]}) * lastname: string; * } * ``` */ export declare const JsonPropertyOrder: JsonPropertyOrderDecorator;