Skip to content

Commit 6252ced

Browse files
committed
fix(@ddd-framework/collections): generic type fix
1 parent 9c90c1a commit 6252ced

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/collections/src/entity-collection.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ export class EntityCollection<E extends Entity, K extends keyof E = keyof E>
7777
/**
7878
* Returns a specific object from the EntityCollection.
7979
*/
80-
public get(entity: E): Entity | undefined;
81-
public get(entityId: E[K]): Entity | undefined;
82-
public get(arg: E | E[K]): Entity | undefined {
80+
public get(entity: E): E | undefined;
81+
public get(entityId: E[K]): E | undefined;
82+
public get(arg: E | E[K]): E | undefined {
8383
if (arg instanceof Entity) return this.map.get(EntityId.getId(arg));
8484
return this.map.get(arg as symbol);
8585
}

0 commit comments

Comments
 (0)