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

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

// Alias for backward compatibility
export type DomainError<K extends string = CommonDomainErrorKind> = DomainErrorProps<K>;
export type IDomainError<K extends string = CommonDomainErrorKind> = DomainErrorProps<K>;
export type DomainErrorAlias<K extends string = CommonDomainErrorKind> = DomainErrorProps<K>;
