Lazy Class
Package: @esfx/lazy
Declaration
export declare class Lazy<T>
Constructors
constructor(factory)
Constructs a new instance of the Lazy
class
Declaration
constructor(factory: () => T);
Parameters
- factory
- () => T
Properties
hasValue
Declaration
get hasValue(): boolean;
Property Value
value
Declaration
get value(): T;
Property Value
T
Methods
for(value)
Declaration
static for<T>(value: T): Lazy<T>;
Type Parameters
- T
Parameters
- value
- T
Returns
Lazy<T>
from(factory, args)
Declaration
static from<T, A extends any[]>(factory: (...args: A) => T, ...args: A): Lazy<T>;
Type Parameters
- T
- A
Parameters
- factory
- (...args: A) => T
- args
- A
Returns
Lazy<T>