relax NSManagedObject return types so callers don't need to cast every time

This commit is contained in:
John Estropia
2016-05-10 21:49:50 +09:00
parent 57b66cff34
commit 8b95d337a3
10 changed files with 32 additions and 32 deletions

View File

@@ -49,7 +49,7 @@ public protocol CSObjectObserver: class, AnyObject {
- parameter object: the `NSManagedObject` instance being observed
*/
@objc
optional func objectMonitor(monitor: CSObjectMonitor, willUpdateObject object: NSManagedObject)
optional func objectMonitor(monitor: CSObjectMonitor, willUpdateObject object: AnyObject)
/**
Handles processing right after a change to the observed `object` occurs
@@ -59,7 +59,7 @@ public protocol CSObjectObserver: class, AnyObject {
- parameter changedPersistentKeys: an `NSSet` of key paths for the attributes that were changed. Note that `changedPersistentKeys` only contains keys for attributes/relationships present in the persistent store, thus transient properties will not be reported.
*/
@objc
optional func objectMonitor(monitor: CSObjectMonitor, didUpdateObject object: NSManagedObject, changedPersistentKeys: Set<String>)
optional func objectMonitor(monitor: CSObjectMonitor, didUpdateObject object: AnyObject, changedPersistentKeys: Set<String>)
/**
Handles processing right after `object` is deleted
@@ -68,5 +68,5 @@ public protocol CSObjectObserver: class, AnyObject {
- parameter object: the `NSManagedObject` instance being observed
*/
@objc
optional func objectMonitor(monitor: CSObjectMonitor, didDeleteObject object: NSManagedObject)
optional func objectMonitor(monitor: CSObjectMonitor, didDeleteObject object: AnyObject)
}