UNPKG

domain-objects

Version:

A simple, convenient way to represent domain objects, leverage domain knowledge, and add runtime validation in your code base.

10 lines (9 loc) 625 B
import { DomainEntity } from '../instantiation/DomainEntity'; import { DomainEvent } from '../instantiation/DomainEvent'; import { DomainLiteral } from '../instantiation/DomainLiteral'; /** * Extracts an object that identifies the domain object via unique key, for DomainEntity, DomainEvent, or DomainLiteral. * * Uses the definition of a DomainEntity, DomainEvent, or DomainLiteral in order to extract the properties that uniquely define the domain object, generically. */ export declare const getUniqueIdentifier: <T extends Record<string, any>>(obj: DomainEntity<T> | DomainEvent<T> | DomainLiteral<T>) => Partial<T>;