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

node-lombok does not work with complex object with different types #5

Open
trcoelho opened this issue May 28, 2024 · 0 comments
Open
Labels
good first issue Good for newcomers

Comments

@trcoelho
Copy link

trcoelho commented May 28, 2024

Describe the bug
Following example:

import { Getters, Setters} from 'node-lombok';

@Getters()
@Setters()
class User {
  [x: string]: any;
  private name: string;
  private birthday: Date;

  constructor(name: string, birthday: Date) {
    this.name = name;
    this.birthday = birthday;
  }
}
const user = new User('', new Date());
user.setName('user');
user.setBirthday(new Date());
console.log(user.getName());
console.log(user.getBirthday());

To Reproduce
1- Create an complex type with different attributes types (string, Date, bitint etc...)
2 - Annotate class with @Getters() and @Setters()

Expected behavior
Respect data type as per class attributes definition.

@kartik1998 kartik1998 added the good first issue Good for newcomers label Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants