3 ms·
It's a big neon sign that says "Either this function is expensive, or it isn't but some framework somewhere that sometimes needs to call expensive functions mig
by akoboldfrying 2y ago
It's a big neon sign that says "Either this function is expensive, or it isn't but some framework somewhere that sometimes needs to call expensive functions might also need to call this function using the same syntax".
- resonious 2y agoThis feels very true in Rust but not sure about JS. In JS you can `await` non-promise values without issue.
- lolinder 2y agoNo, because in JavaScript/TypeScript you can happily await any function that you'd like on the chance that it sometimes returns a Promise. If a framework demands that you return a Promise unnecessarily, that's on the framework, not the language.