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

Decorator to disable AutoMap #395

Closed
Morb0 opened this issue Jan 6, 2022 · 1 comment
Closed

Decorator to disable AutoMap #395

Morb0 opened this issue Jan 6, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@Morb0
Copy link

Morb0 commented Jan 6, 2022

Is your feature request related to a problem? Please describe.

In case when I using plugin that automatically mark all properties as @AutoMap I can have a scenario where I don't want AutoMap property to just ignore them or to fix problem like Circular Dependencies.

Describe the solution you'd like

Add decorator that override AutoMap like AutoMapDisable and disable him.

Describe alternatives you've considered

No response

Additional context

No response

@Morb0 Morb0 added the enhancement New feature or request label Jan 6, 2022
@nartc nartc closed this as completed in 2de6893 Jan 6, 2022
@nartc
Copy link
Owner

nartc commented Jan 6, 2022

https://automapperts.netlify.app/docs/plugins-system/classes-transformer-plugin#ignore-a-property
A new decorator is not needed because that decorator DOES nothing rather than act as a flag for the Transformer Plugin to skip a property. I figured it'd be better to use a JSDoc comment tag instead.

export class Foo {
   /**
    * @autoMapIgnore
    */
   ignoreMe: string;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants