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

fixed missing type information on related models #622

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

joschne
Copy link

@joschne joschne commented Sep 27, 2018

What type of pull request are you creating?

  • [x ] Bug Fix
  • Enhancement
  • Documentation

How many unit test did you write for this pull request?

zero. small fix that runs without any problems on my big project.

Please add a description for your pull request:

Issue
Related models will not be typed (i.e. get the type any or any[]) if they do not appear in a scope method (like `__get__related_model"). This leads to a lot of missing type information if you have a clean rest api, where you only expose a few remote methods but not the whole bunch of methods exposed by default.

Solution
This Pull Request adds the type information about the related model to the model description.

@joschne
Copy link
Author

joschne commented Sep 28, 2018

Additionally I added a '?' to optional class properties in order to support this feature introduced with TypeScript 2

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

Successfully merging this pull request may close these issues.

1 participant