The returned function evaluates the value first time it is called. Then it just returns the previously evaluated one.
The failed value evaluation will be retried on the next call.
Type Parameters
T
Parameters
provider: ((this) => T)
A no-arg function evaluating the value.
(this): T
Parameters
this: void
Returns T
Returns ((this) => T)
A function that returns the value evaluated by provider.
Creates a provider of lazily evaluated value.
The returned function evaluates the value first time it is called. Then it just returns the previously evaluated one. The failed value evaluation will be retried on the next call.