Skip to content

Commit

Permalink
Patch
Browse files Browse the repository at this point in the history
  • Loading branch information
muukii committed Jul 13, 2024
1 parent 8271816 commit c615c04
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Sources/VergeTypedIdentifier/EntityType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,17 @@ public struct EntityIdentifier<Entity: EntityType> : Hashable, CustomStringConve
}

/// A protocol describes object is an Entity.
public protocol EntityType: Equatable, Sendable {
public protocol EntityType: Identifiable, Equatable, Sendable {

associatedtype EntityIDRawType: Hashable, Sendable

var entityID: EntityID { get }

typealias EntityID = EntityIdentifier<Self>
}

extension EntityType {
public var id: EntityID {
entityID
}
}

0 comments on commit c615c04

Please sign in to comment.