[T] AttributeDecorator
type AttributeDecorator = (context, target) => void;
Specify that the target property should be encoded as an XML attribute instead of node.
Parameters
Parameter | Type |
---|---|
context | DecoratorContext |
target | ModelProperty |
Returns
void
Examples
model Blob { id: string;}
<Blob> <id>abcdef</id></Blob>
model Blob { @attribute id: string;}
<Blob id="abcdef"></Blob>