-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(renaming): Renamed IdentityMap and EntityEnumWrapper (#63)
- Loading branch information
Showing
14 changed files
with
209 additions
and
203 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
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
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@available(unavailable, renamed: "EntityWrapper") | ||
public typealias EntityEnumWrapper = EntityWrapper | ||
|
||
/// A type wrapping one or more Identifiable types. | ||
/// You should rarely need to use this type. However it can happens to have a non Aggregate object containing Identifiable | ||
/// objects to group them (for consistency or naming). This is especially true with enum cases. | ||
public protocol EntityWrapper { | ||
/// Entities contained by all cases relative to the parent container | ||
/// - Returns: entities contained in the wrapper | ||
//// | ||
/// Example: | ||
//// ```swift | ||
/// enum MyEnum: EntityWrapper { | ||
/// case a(A) | ||
/// case b(B) | ||
/// | ||
/// // note: you would also need to create computed getter/setter for a and b | ||
/// func wrappedEntitiesKeyPaths<Root>(relativeTo root: WritableKeyPath<Root, Self>) -> [PartialIdentifiableKeyPath<Root>] { | ||
/// [.init(root.appending(\.a)), .init(root.appending(\.b))] | ||
/// } | ||
/// } | ||
/// ``` | ||
func wrappedEntitiesKeyPaths<Root>(relativeTo parent: WritableKeyPath<Root, Self>) -> [PartialIdentifiableKeyPath<Root>] | ||
} |
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
Oops, something went wrong.