store (assetType, dataFormat, data, assetId) {
        dataFormat = dataFormat || assetType.runtimeFormat;

        /* //
        // promise originally returned by ScratchStorage
        return new Promise(
            (resolve, reject) =>
                this.webHelper.store(assetType, dataFormat, data, assetId)
                    .then(body => {
                        this.builtinHelper._store(assetType, dataFormat, data, body.id);
                        return resolve(body);
                    })
                    .catch(error => reject(error))
        );
        // */

        return this.firebaseHelper.store(assetType, dataFormat, data, assetId)
            .then(() => {
                this.builtinHelper._store(assetType, dataFormat, data, assetId);
                return Promise.resolve(assetId);
            })
            .catch(error => Promise.reject(error));
    }
/**
     * Stores a provided asset. For now, only attempts to store assets via
     * FirebaseHelper (and then BuiltinHelper on success). Utilizes the named
     * member firebaseHelper, roughly mirroring the process of
     * ScratchStorage.store(), which does the same with webHelper.
     * @function store
     * @param {AssetType} assetType - The type of asset to store.
     * @param {string} assetId - The ID of the asset to store: a project ID, MD5, etc.
     * @param {DataFormat} dataFormat - The file format / file extension of the asset to store: PNG, JPG, etc.
     * @return {Promise} A promise indicating the success of the attempted
     * storage.
     */
Stores a provided asset. For now, only attempts to store assets via
FirebaseHelper (and then BuiltinHelper on success). Utilizes the named
member firebaseHelper, roughly mirroring the process of
ScratchStorage.store(), which does the same with webHelper.
@function store
@param {AssetType} assetType - The type of asset to store.
@param {string} assetId - The ID of the asset to store: a project ID, MD5, etc.
@param {DataFormat} dataFormat - The file format / file extension of the asset to store: PNG, JPG, etc.
@return {Promise} A promise indicating the success of the attempted
storage.
Stores a provided asset . For now only attempts to store assets via FirebaseHelper ( and then BuiltinHelper on success ) . Utilizes the named member firebaseHelper roughly mirroring the process of ScratchStorage . store () which does the same with webHelper . @function store @param { AssetType } assetType - The type of asset to store . @param { string } assetId - The ID of the asset to store : a project ID MD5 etc . @param { DataFormat } dataFormat - The file format / file extension of the asset to store : PNG JPG etc . @return { Promise } A promise indicating the success of the attempted storage .
store (assetType, dataFormat, data, assetId) {
        dataFormat = dataFormat || assetType.runtimeFormat;
        return this.firebaseHelper.store(assetType, dataFormat, data, assetId)
            .then(() => {
                this.builtinHelper._store(assetType, dataFormat, data, assetId);
                return Promise.resolve(assetId);
            })
            .catch(error => Promise.reject(error));
    }
store ( assetType , dataFormat , data , assetId ) { dataFormat = dataFormat || assetType . runtimeFormat ; return this . firebaseHelper . store ( assetType , dataFormat , data , assetId ) . then ( ( ) => { this . builtinHelper . _store ( assetType , dataFormat , data , assetId ) ; return Promise . resolve ( assetId ) ; } ) . catch ( error => Promise . reject ( error ) ) ; }
Stores a provided asset.
Stores a provided asset .
/* //
        // promise originally returned by ScratchStorage
        return new Promise(
            (resolve, reject) =>
                this.webHelper.store(assetType, dataFormat, data, assetId)
                    .then(body => {
                        this.builtinHelper._store(assetType, dataFormat, data, body.id);
                        return resolve(body);
                    })
                    .catch(error => reject(error))
        );
        // */