Entry.swift 865 B

1234567891011121314151617181920212223
  1. /// Creates an ``EnvironmentValues``, or ``AppStorageValues`` entry.
  2. ///
  3. /// You can create ``EnvironmentValues`` entries by extending the ``EnvironmentValues`` struct with `@Entry`-annotated properties:
  4. /// ```swift
  5. /// extension EnvironmentValues {
  6. /// @Entry var myCustomValue: String = "Default value"
  7. /// @Entry var anotherCustomValue = true
  8. /// }
  9. /// ```
  10. ///
  11. /// You can create ``AppStorageValues`` entries by extending the ``AppStorageValues`` struct with `@Entry`-annotated properties:
  12. /// ```swift
  13. /// extension AppStorageValues {
  14. /// @Entry var myCustomValue: String = "Default value"
  15. /// @Entry var anotherCustomValue = true
  16. /// }
  17. /// ```
  18. // @attached(accessor) @attached(peer, names: prefixed(__Key_))
  19. // public macro Entry() =
  20. // #externalMacro(
  21. // module: "SwiftCrossUIMacrosPlugin",
  22. // type: "EntryMacro"
  23. // )