Id
Defined in: types/Id.ts:13
Base entity class for representing any item with an ID. Assists in a generic implementation of the DomainCollection class.
Example
const user = new Id<number>(1);
console.log(user.id); // 1
Extended by
Type Parameters
T
T
The type of the unique identifier.
Constructors
Constructor
new Id<T>(id?): Id<T>;
Defined in: types/Id.ts:21
Creates a new Id instance.
Parameters
id?
T
The unique identifier.
Returns
Id<T>
Properties
id?
optional id: T;
Defined in: types/Id.ts:15
The unique identifier for the entity.