diff --git a/Sources/WhoopDIKitMacros/InjectableMacro.swift b/Sources/WhoopDIKitMacros/InjectableMacro.swift index 40d2a9a..1b2085c 100644 --- a/Sources/WhoopDIKitMacros/InjectableMacro.swift +++ b/Sources/WhoopDIKitMacros/InjectableMacro.swift @@ -31,12 +31,20 @@ struct InjectableMacro: ExtensionMacro, MemberMacro { let accessLevel = self.accessLevel(declaration: declaration) ?? "internal" return [ + /// Adds the static inject function, such as: + /// public static func inject() -> Self { + /// Self.init(myValue: WhoopDI.inject(nil)) + /// } """ \(raw: accessLevel) static func inject() -> Self { Self.init(\(raw: injectingVariables)) } """, + /// Adds the memberwise init, such as: + /// public init(myValue: String) { + /// self.myValue = myValue + /// } """ \(raw: accessLevel) init(\(raw: initializerArgs)) { \(raw: initializerStoring)