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

Support for class-based model #13

Closed
gms1 opened this issue Sep 11, 2016 · 3 comments
Closed

Support for class-based model #13

gms1 opened this issue Sep 11, 2016 · 3 comments

Comments

@gms1
Copy link

gms1 commented Sep 11, 2016

part of my model is class-based ( because it need to be decorated for the object-relational mapping and should have a default constructor ) and
although I would be able to declare additional interfaces, this would lead to duplicating all the property definitions of the classes to the corresponding interfaces.

Do you have any plan to support a class-based model?

@lukeautry
Copy link
Owner

I think this should be possible and fairly simple to implement, with the understanding that only class properties would be looked at, not methods.

There's also the slightly more complicated matter of constructor variables, e.g. constructor(public value: string). I would expect that to also be included in the model.

I'll look into this and see if it can be done without introducing unnecessary complexity.

@lukeautry
Copy link
Owner

lukeautry commented Sep 12, 2016

@gms1 I've opened up a pull request to support this behavior: #14

Since you opened this issue, please take a look at those changes and provide some feedback. I've added a suite of tests for these changes and done some manual testing, but I'd like your input.

Thanks!

@lukeautry
Copy link
Owner

@gms1 This has been released and merged in 0.0.61.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants