getDataAs(type = undefined, copy = true) {
            if (this.loaded) {
                if (type === this._type) {
                    return copy ? $.converter.copy(this._tRef, this._data, type || this._type) : this._promise;
                }
                return this._transformDataIfNeeded(this._tRef, this._data, type || this._type, copy) || this._promise;
            }
            return this._promise.then(data => this._transformDataIfNeeded(this._tRef, data, type || this._type, copy) || data);
        }
Access the cache record data indirectly. Preferred way of data access. Asynchronous.
@param {string} [type=undefined]
@param {boolean} [copy=true] if false and same type is retrieved as the cache type,
 copy is not performed: note that this is potentially dangerous as it might
 introduce race conditions (you get a cache data direct reference you modify).
@returns {OpenSeadragon.Promise<?>} desired data type in promise, undefined if the cache was destroyed