Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic macro setup #41

Merged
merged 4 commits into from
Jan 5, 2024
Merged

Basic macro setup #41

merged 4 commits into from
Jan 5, 2024

Conversation

MaximBazarov
Copy link
Owner

@MaximBazarov MaximBazarov commented Dec 31, 2023

Introduces the first macro @EnvironmentObservable that removes code that is repeatable, and similar to swift @Observable

@EnvironmentObservable
final class Notes {
    @Persistent
    var name: String = ""
    
    var count: Int = 0
}

will expand to:
Screenshot 2023-12-31 at 13 57 02

Package.swift Outdated Show resolved Hide resolved
serjooo
serjooo previously approved these changes Jan 2, 2024
Copy link
Contributor

@serjooo serjooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and exciting!

@MaximBazarov MaximBazarov merged commit f96cb9d into main Jan 5, 2024
1 check passed
@MaximBazarov MaximBazarov deleted the macros/root-observablestate branch January 5, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants