UNPKG

@typescript-eda/domain

Version:

Core domain primitives for event-driven architecture

21 lines 720 B
/** * @fileoverview This file defines the Entity class, a base class for objects that have a distinct identity. * @author rydnr * @module domain/entity */ import { ValueObject } from './value-object'; /** * Represents an entity, which is an object with a distinct identity that persists through different states. * @template T The type of the properties of the entity. */ export declare abstract class Entity<T> extends ValueObject<T> { protected readonly props: T; /** * Creates an instance of Entity. * @param {T} props The properties of the entity. * @protected */ protected constructor(props: T); get<K extends keyof T>(key: K): T[K]; } //# sourceMappingURL=entity.d.ts.map