Add lazy
function
#264
Closed
aleclarson
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
It can be easily solved with class MyClass {
get thing() {
return once(expensiveCalculation);
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
Define a property whose value isn't calculated until first access.
It can also be used as a decorator.
Beta Was this translation helpful? Give feedback.
All reactions