-
Notifications
You must be signed in to change notification settings - Fork 641
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
Add lazy type for lazy importing of models #1722
Conversation
I'm still thinking about how to handle errors (e.g. if the
I expect that a root store may have a number of |
Awesome work! |
@mweststrate Do you have thoughts on this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm okay with merging this. It's self-contained and seems well-written.
Hey @jamonholmgren - last comment you made on this PR was that it's ready to merge. Should we do that? I'm not familiar with our overall release strategy. Do we merge this kind of thing directly into the I'm guessing this is the PR we had that Twitter comment about. |
We have a related MR adding more types in #1960. I'm guessing we may get a conflict or two in docs files between this one and that one, but I'm hoping we can merge these in together and ship three new types total in the next minor version. |
Spoke with Jamon yesterday and we plan to ship an alpha minor version sometime next week. I'm going to merge this in now and target that release. Thanks, @clgeoio! Sorry it took us so long here. |
This PR is very much based on: #247.
It adds the
lazy
type, which can be used to dynamically import a model, it relates to the issue #1607This PR still has a couple of todos:
as unknown as T
casting that is happening in the lazy function. Could there be a better type to use?any
that is being used in theshouldLoadPredicate
. It'd be awesome if this could somehow infer the parent model