47 lines
1.2 KiB
TypeScript
47 lines
1.2 KiB
TypeScript
/**
|
|
* Class that represents a loaded or loading item, enabling strict unloading policies.
|
|
* @class AssetToken
|
|
* @memberof jibo.loader
|
|
*/
|
|
export default class AssetToken {
|
|
/**
|
|
* Name of the named cache that this load was attached to.
|
|
* @type {string}
|
|
* @name jibo.loader.AssetToken#cache
|
|
* @readonly
|
|
*/
|
|
readonly cache: string;
|
|
/**
|
|
* Unique id within the named cache that this load was attached to.
|
|
* @type {string}
|
|
* @name jibo.loader.AssetToken#id
|
|
* @readonly
|
|
*/
|
|
readonly id: string;
|
|
/**
|
|
* Globally unique key used to cache this load.
|
|
* @type {string}
|
|
* @name jibo.loader.AssetToken#key
|
|
* @readonly
|
|
*/
|
|
readonly key: string;
|
|
/**
|
|
* If this token is valid. Tokens that have been unloaded are invalid.
|
|
* @type {boolean}
|
|
* @name jibo.loader.AssetToken#isValid
|
|
* @readonly
|
|
*/
|
|
readonly isValid: boolean;
|
|
/**
|
|
* Cancels any ongoing load (if still being loaded) and removes this load from the cache.
|
|
* @method jibo.loader.AssetToken#unload
|
|
*/
|
|
unload(): void;
|
|
/**
|
|
* Alias for unload()
|
|
* @method jibo.loader.AssetToken#cancel
|
|
* @see jibo.loader.AssetToken#unload
|
|
*/
|
|
cancel(): void;
|
|
}
|