destroy(data, type) {
        const destructor = this.destructors[type];
        if (destructor) {
            const y = destructor(data);
            return $.type(y) === "promise" ? y : $.Promise.resolve(y);
        }
        return undefined;
    }
Destroy the data item given.
@param {string} type data type
@param {any} data
@return {OpenSeadragon.Promise<any>|undefined} promise resolution with data passed from constructor, or undefined
 if not such conversion exists