added a typealias for the object type contained in ListMonitor and ObjectMonitor

This commit is contained in:
John Estropia
2017-04-19 17:04:34 +09:00
parent b6bc7c2edf
commit b0e2655bdf
3 changed files with 20 additions and 10 deletions

View File

@@ -71,6 +71,11 @@ public final class ListMonitor<T: DynamicObject>: Hashable {
// MARK: Public (Accessors)
/**
The type for the objects contained bye the `ListMonitor`
*/
public typealias ObjectType = T
/**
Returns the object at the given index within the first section. This subscript indexer is typically used for `ListMonitor`s created with `monitorList(_:)`.

View File

@@ -42,6 +42,11 @@ import CoreData
@available(OSX 10.12, *)
public final class ObjectMonitor<EntityType: DynamicObject>: Equatable {
/**
The type for the object contained by the `ObjectMonitor`
*/
public typealias ObjectType = EntityType
/**
Returns the `NSManagedObject` instance being observed, or `nil` if the object was already deleted.
*/