Skip to content

Undefined import when importing VO from a DomainError #465

Open
@Varagos

Description

@Varagos

BL Example

DomainError AccountIsBlockedError(accountId:string, accountStatus: AccountStatusVO) {
    message: `Account ${accountId} is ${accountStatus.status}. Please contact support.`,
    errorId: 'DRIVER_ACCOUNT_IS_BLOCKED'
}

TS Output

import { Domain } from '@bitloops/bl-boilerplate-core';
import { AccountStatusVO } from 'undefined';
export class AccountIsBlockedError extends Domain.Error {
  static readonly errorId: string = 'DRIVER_ACCOUNT_IS_BLOCKED';
  constructor(accountId: string, accountStatus: AccountStatusVO) {
    super(
      `Account ${accountId} is ${accountStatus.status}. Please contact support.`,
      AccountIsBlockedError.errorId
    );
  }
}

I presume this is caused because when are resolving the imports, we try to find the classtype from the identifier, and perhaps we can't resolve the AccountIsBlockedError as DomainError. Could be something else though, needs investigation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions