Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined import when importing VO from a DomainError #465

Open
Varagos opened this issue May 29, 2023 · 0 comments
Open

Undefined import when importing VO from a DomainError #465

Varagos opened this issue May 29, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Varagos
Copy link
Contributor

Varagos commented May 29, 2023

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.

@Varagos Varagos added the bug Something isn't working label May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant