Class: shaka.util.Lazy

This contains a single value that is lazily generated when it is first requested. This can store any value except "undefined".

Constructor

new Lazy(gen)

This contains a single value that is lazily generated when it is first requested. This can store any value except "undefined".

Parameters:
Name Type Description
gen function
Source:

Members

gen_ :function():T

Type:
  • function():T
Source:

value_ :T|undefined

Type:
  • T | undefined
Source:

Methods

reset()

Resets the value of the lazy function, so it has to be remade.
Source:

value() → {T}

Source:
Returns:
Type
T