Aliases.swift 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. ////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2014 Realm Inc.
  4. //
  5. // Licensed under the Apache License, Version 2.0 (the "License");
  6. // you may not use this file except in compliance with the License.
  7. // You may obtain a copy of the License at
  8. //
  9. // http://www.apache.org/licenses/LICENSE-2.0
  10. //
  11. // Unless required by applicable law or agreed to in writing, software
  12. // distributed under the License is distributed on an "AS IS" BASIS,
  13. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. // See the License for the specific language governing permissions and
  15. // limitations under the License.
  16. //
  17. ////////////////////////////////////////////////////////////////////////////
  18. import Foundation
  19. import Realm
  20. // These types don't change when wrapping in Swift
  21. // so we just typealias them to remove the 'RLM' prefix
  22. // MARK: Aliases
  23. /**
  24. `PropertyType` is an enum describing all property types supported in Realm models.
  25. For more information, see [Realm Models](https://realm.io/docs/swift/latest/#models).
  26. ### Primitive types
  27. * `Int`
  28. * `Bool`
  29. * `Float`
  30. * `Double`
  31. ### Object types
  32. * `String`
  33. * `Data`
  34. * `Date`
  35. ### Relationships: Array (in Swift, `List`) and `Object` types
  36. * `Object`
  37. * `Array`
  38. */
  39. public typealias PropertyType = RLMPropertyType
  40. /**
  41. An opaque token which is returned from methods which subscribe to changes to a Realm.
  42. - see: `Realm.observe(_:)`
  43. */
  44. public typealias NotificationToken = RLMNotificationToken
  45. extension NotificationToken {
  46. @available(*, unavailable, renamed: "invalidate()")
  47. @nonobjc public func stop() { fatalError() }
  48. }