question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possibility of passing a property (acting as a method)

See original GitHub issue

Would it be possible to pass an argument? I can “hack” it on a computed property like below, but asyncComputed properties expect a return that is a promise.

asyncComputed: {
  totals() {
    return {
      inDay(date) {
        return date;
      }
    }
  }
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
foxbenjaminfoxcommented, Nov 3, 2016

You’re entirely correct in that methods are generally more logic-like. But a very important use for methods is as pseodo-computed properties that take arguments. Yes, you could also use filters for that purpose, but sometimes a method is easier. For instance, this part of the guide has a bit about using a method to replace a computed property.

But while usually you can do that, and swap out a computed property for a method if you need to parameterize it, you can’t do that for a aysnc computed property. That’s where this whole story started, and that’s how this issue is related to this plugin.

I agree that most likely this won’t be the use scenario that finally resolves everything into crystal clarity, but I do agree with @veksen that it would be kind of nice to have. The only question is whether or not it’s possible to do without rewriting the whole Vue templating system, which would be way too much effort for this (relatively minor, all things considered) feature.

0reactions
foxbenjaminfoxcommented, Jan 20, 2017

For the reasons discussed above, I think it unlikely that this will be implemented any time soon, so I’m closing this issue.

I’ll keep my eyes open though. Who knows, perhaps I’ll find a nice and elegant way to implement this at some point.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rules related to the Passing of Property - Legal PaathShala
The passing of property is an important aspect to help determine the liabilities and rights of both the buyer and the seller. Once...
Read more >
Passing of Property – Part 1 - Toppr
The passing of property is an important aspect to help determine the liabilities and rights of both the buyer and the seller. Once...
Read more >
passing of property in unascertained goods: Lecture notes - 6 ...
(iii) An appropriation by the seller with the assent of the buyer may be said always to involve an actual or constructive delivery....
Read more >
§ 2-401. Passing of Title; Reservation for Security; Limited ...
Any retention or reservation by the sellerof the title (property) in goods shipped or delivered to the buyer is limited in effect to...
Read more >
The Passing of Property in Part of a Bulk - jstor
conversion. This way involves looking more closely at section 25 (2) of the. Sale of Goods Act and section 2 (1) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found