Replies: 1 comment
|
Same question applies to |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
While hacking on solargraph-rails I've discovered that Solargraph has a mechanism for annotating methods as returning "the generic" from a method chain. I've used this to annotate
ActiveRecord::FinderMethods#firstin myhacksbranch. This makes it possible to write code likeUser.find(123).posts.active.where("...").firstand actually getPostas the return type of#first.My question is: is it likely that this capability will be removed without replacement in future Solargraph releases? In general it's really tricky to refer to generic types using YARD syntax, but I hope that this little hack stays in place as long as Solargraph is using YARD.
All reactions