Skip to main content
Version: Next 🚧

[T] AttributeDecorator

type AttributeDecorator: (context, target) => void;

Specify that the target property should be encoded as an XML attribute instead of node.

Parameters

ParameterType
contextDecoratorContext
targetModelProperty

Returns

void

Examples

model Blob {
id: string;
}
<Blob>
<id>abcdef</id>
</Blob>
model Blob {
@attribute id: string;
}
<Blob id="abcdef">
</Blob>