InternalThe return type
Optional context type
The return type
Optional context type
Gets the cached value if available.
Gets the cached error if one occurred.
Returns true if the function has been executed.
Executes the function once and caches the result. Subsequent calls return the cached value without re-executing.
The function to execute
The result of the function
Synchronous version of ResolveOnce for functions that return non-promise values.
This class is used internally by ResolveOnce when it detects a synchronous function. It executes the function once and caches the result or error for subsequent calls.