-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
076647d
commit 3804ed8
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
// Copyright © 2024 JARMourato All rights reserved. | ||
|
||
import InjectionMacroImpl | ||
import InjectionMacrosImpl | ||
|
||
// MARK: - Macros | ||
|
||
/// Creates an unique `DependencyKey` for the variable and adds getters and setters. | ||
/// The initial value of the variable becomes the default value of the `DependencyKey`. | ||
@attached(peer, names: prefixed(___)) | ||
@attached(accessor, names: named(get), named(set)) | ||
public macro DependencyKey() = #externalMacro(module: "InjectionMacroImpl", type: "DependencyKeyMacro") | ||
public macro DependencyKey() = #externalMacro(module: "InjectionMacrosImpl", type: "DependencyKeyMacro") | ||
|
||
/// Applies the @DependencyKey macro to each child in the scope. | ||
/// This should only be applied on an `EnvironmentValues` or `DependencyValues` extensions. | ||
@attached(memberAttribute) | ||
public macro Inject() = #externalMacro(module: "InjectionMacroImpl", type: "InjectValues") | ||
public macro Inject() = #externalMacro(module: "InjectionMacrosImpl", type: "InjectValues") |