@pocket-architect/core 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Entity.d.ts +2 -2
- package/package.json +1 -1
- package/src/Entity.ts +2 -2
package/build/Entity.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { EntityId } from './EntityId';
|
|
2
2
|
export declare abstract class Entity<T, E, H extends EntityId<E>> {
|
|
3
|
-
protected readonly _id:
|
|
3
|
+
protected readonly _id: H;
|
|
4
4
|
protected props: T;
|
|
5
5
|
protected constructor(props: T, id?: H | E);
|
|
6
6
|
equals(object?: Entity<T, E, H>): boolean;
|
|
7
|
-
get id():
|
|
7
|
+
get id(): H;
|
|
8
8
|
toPrimitive(): T;
|
|
9
9
|
toJSON(): T;
|
|
10
10
|
}
|
package/package.json
CHANGED
package/src/Entity.ts
CHANGED
|
@@ -5,7 +5,7 @@ const isEntity = <T, E, M extends EntityId<E>>(v: Entity<T, E, M>): v is Entity<
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
export abstract class Entity<T, E, H extends EntityId<E>> {
|
|
8
|
-
protected readonly _id:
|
|
8
|
+
protected readonly _id: H;
|
|
9
9
|
protected props: T;
|
|
10
10
|
|
|
11
11
|
protected constructor(props: T, id?: H|E) {
|
|
@@ -33,7 +33,7 @@ export abstract class Entity<T, E, H extends EntityId<E>> {
|
|
|
33
33
|
return this._id.equals(object._id);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
get id():
|
|
36
|
+
get id(): H {
|
|
37
37
|
return this._id
|
|
38
38
|
}
|
|
39
39
|
|