export type CommonDomainErrorKind = 'validation' | 'invariant' | string;

export interface IDomainError<K extends string = CommonDomainErrorKind> extends Error {
  readonly type: 'domain';
  readonly context: string;
  readonly kind: K;
}