ComputedProperty()
A macro that adds a computed app entity property with a get accessor and an optional set accessor.
Declaration
@attached(peer, names: prefixed(`$`), prefixed(`_`)) @attached(accessor, names: named(get), named(set)) macro ComputedProperty()Example
struct Restaurant: AppEntity {
var model: Menu
@ComputedProperty
var menuItems: [MenuItem] {
model.menuItems
}
}See Also
Property declarations
ComputedProperty(title:)ComputedProperty(indexingKey:)ComputedProperty(customIndexingKey:)ComputedProperty(title:customIndexingKey:)ComputedProperty(title:indexingKey:)DeferredProperty()DeferredProperty(title:)DeferredProperty(indexingKey:)DeferredProperty(title:indexingKey:)EntityPropertyEntityPropertyModifiersProperty comparators