CachedResource <T>
Hierarchy
- DecoratedResource<T>
- CachedResource
Index
Constructors
constructor
Type parameters
- T: Resource
Parameters
resource: T
Returns CachedResource<T>
Accessors
isAsync
Whether this Resource is loaded asynchronously
Returns boolean
name
The name of the referenced file
Returns string
progress
Optional progress tracker to monitor progress
Returns undefined | ProgressTracker
Optional progress tracker to monitor progress
Parameters
value: undefined | ProgressTracker
Returns void
Methods
resolve
Resolves the file contents
Returns Promise<File>
The resolved file.
setPlayground
Parameters
playground: UniversalPHP
Returns Promise<void>
staticcreate
Creates a new Resource based on the given file reference
Parameters
ref: FileReference
The file reference to create the Resource for
options: ResourceOptions
Additional options for the Resource
Returns Resource
A new Resource instance
A decorator for a resource that adds caching functionality.