Underscores on Javascript classes
Hi, Im evaluating class-transformer and it looks great. However our project uses plain JS files, not typescript. So variables declared in the class constructor get prefixed with '_'. Eg 'this.name' creates '_name' The result of this is classToPlain creates {name:xxx } rather than {name:xxx } Is there anyway to remove these '' ? (Because its not typescript the @Expose annotation won't work) Thanks
(Because its not typescript the
@exposeannotation won't work)
@FredOleary why? Could you explain your problem one more time with better explanation?
Hi @FredOleary, to make it work, you will need to add support for decorators via the Babel decorator plugin.
I will go ahead and close this question, but feel free to continute the conversation if you have any more question.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.