An attribute that describes the type of a property, field, or the return type of a member function.
Inheritance Hierarchy
Attribute
TypeAttribute
Remarks
This attribute can be used for the automatic XAML-like serialization by GraphML. It is required for fields and properties that should use attribute-based serialization to inform the reflection engine about the type of the field/property in the meta-data of the class.
const MyClass = yfiles.lang.Class('MyClass', {
constructor: function() { // the constructor function
this.$y = 42;
},
myProperty: {
$meta:[yfiles.lang.TypeAttribute(yfiles.lang.Number.$class)],
get: function() {
return this.$y;
},
},
});
Type Details
- yfiles module
- lang
- yfiles-umd modules
- All modules
- Legacy UMD name
- yfiles.lang.TypeAttribute
Constructors
Initializes a new instance of the TypeAttribute class.
Properties
Gets the type that this attribute references.