nartc / automapper-transformer-plugin

Typescript Transformer Plugin for @nartc/automapper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't Resolve classes in a different .ts file

sarathfrancis90 opened this issue · comments

I am facing an issue when using the automapper transformer plugin with nestjsx-automapper.
I have added the plugin info in nest-cli.json file.

Transformer Plugin unable to resolve class defined in a separate .ts file.

Details

Versions:
NestJs: 7.4.2
nestjsx-automapper: 3.1.2
@nartc/automapper-transformer-plugin: 1.0.21
typescript: 3.7.4

Example.
There is profile.ts file with following.

export class Profile {
  bio: string;
  age: number;
}

and there is user.ts file with

import { Profile } from './profile'
export class User {
  firstName: string;
  lastName: string;
  profile: Profile;
}

when building the project, error is thrown stating, Can't Resolve Profile from the User Class.

Please advise.

Thanks,

Thanks for reporting. I'll take a look as soon as possible.

@nartc :Any update on this?

@sarathfrancis90 Hi, I'm in a middle of transitioning to a new job so kind of busy at the moment. I'll get to the issue as soon as I can. Thank you for your patience.

@sarathfrancis90 I can't seem to reproduce this issue. Can you please provide a sample repository?