diff --git a/Sources/AppState/Application+public.swift b/Sources/AppState/Application+public.swift index 447209d..11a919f 100644 --- a/Sources/AppState/Application+public.swift +++ b/Sources/AppState/Application+public.swift @@ -1,4 +1,6 @@ public extension Application { + // MARK: - Type Methods + /// Provides a description of the current application state static var description: String { let state = shared.cache.allValues @@ -102,6 +104,8 @@ public extension Application { shared.value(keyPath: keyPath) } + // MARK: - Instance Methods + /** Retrieves a dependency for the provided `id`. If dependency is not present, it is created once using the provided closure. diff --git a/Sources/AppState/Application.swift b/Sources/AppState/Application.swift index 8a66635..58fd3f0 100644 --- a/Sources/AppState/Application.swift +++ b/Sources/AppState/Application.swift @@ -64,7 +64,7 @@ public class Application: ObservableObject { func load( dependency keyPath: KeyPath> ) { - _ = dependency(keyPath) + _ = value(keyPath: keyPath) } /// Loads the default dependencies for use in Application.