diff --git a/Sources/Defaults/Defaults.swift b/Sources/Defaults/Defaults.swift index e34f959..e6f807f 100644 --- a/Sources/Defaults/Defaults.swift +++ b/Sources/Defaults/Defaults.swift @@ -35,6 +35,9 @@ public enum Defaults { } } +public typealias _Defaults = Defaults +public typealias _Default = Default + extension Defaults { // We cannot use `Key` as the container for keys because of "Static stored properties not supported in generic types". /** diff --git a/Sources/Defaults/Documentation.docc/Documentation.md b/Sources/Defaults/Documentation.docc/Documentation.md index 8a3bf3d..06ab534 100644 --- a/Sources/Defaults/Documentation.docc/Documentation.md +++ b/Sources/Defaults/Documentation.docc/Documentation.md @@ -30,6 +30,17 @@ Defaults[.quality] = 0.5 [Learn More](https://github.com/sindresorhus/Defaults#usage) +### Tip + +If you don't want to import this package in every file you use it, add the below to a file in your app. You can then use `Defaults` and `@Default` from anywhere without an import. + +```swift +import Defaults + +typealias Defaults = _Defaults +typealias Default = _Default +``` + ## Topics ### Essentials