Skip to content

Commit

Permalink
feat(alias): support DomainObject.alias declaration (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
uladkasach authored May 11, 2024
1 parent 8c7f0b2 commit 7348ae2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/instantiation/DomainObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ export class DomainObject<T extends Record<string, any>> {
Object.assign(this, hydratedProps);
}

/**
* DomainObject.alias
*
* When set, declares the alias via which domain objects of this class are known to be referred to.
*
* Relevance
* - formalizes that we can expect to see the dobj referred to by this alias
* - enables code generators to use this colloquial alias in contracts for better devex
*/
public static alias?: string;

/**
* DomainObject.schema
*
Expand Down

0 comments on commit 7348ae2

Please sign in to comment.