@@ -103,7 +103,7 @@ export class Reference {
103
103
return getParent ( this ) ;
104
104
}
105
105
106
- throwIfRoot_ ( name : string ) : void {
106
+ _throwIfRoot ( name : string ) : void {
107
107
if ( this . location . path === '' ) {
108
108
throw invalidRootOperation ( name ) ;
109
109
}
@@ -128,7 +128,7 @@ export function uploadBytes(
128
128
if ( metadata != null ) {
129
129
metadataValidator ( metadata ) ;
130
130
}
131
- ref . throwIfRoot_ ( 'uploadBytes' ) ;
131
+ ref . _throwIfRoot ( 'uploadBytes' ) ;
132
132
return new UploadTask ( ref , new FbsBlob ( data ) , metadata ) ;
133
133
}
134
134
@@ -159,7 +159,7 @@ export function uploadString(
159
159
if ( metadata != null ) {
160
160
metadataValidator ( metadata ) ;
161
161
}
162
- ref . throwIfRoot_ ( 'putString' ) ;
162
+ ref . _throwIfRoot ( 'putString' ) ;
163
163
const data = dataFromString ( format , value ) ;
164
164
const metadataClone = { ...metadata } as Metadata ;
165
165
if ( metadataClone [ 'contentType' ] == null && data . contentType != null ) {
@@ -270,7 +270,7 @@ export function list(
270
270
* @param ref - Storage Reference to get metadata from.
271
271
*/
272
272
export function getMetadata ( ref : Reference ) : Promise < Metadata > {
273
- ref . throwIfRoot_ ( 'getMetadata' ) ;
273
+ ref . _throwIfRoot ( 'getMetadata' ) ;
274
274
return ref . service . getAuthToken ( ) . then ( authToken => {
275
275
const requestInfo = requests . getMetadata (
276
276
ref . service ,
@@ -297,7 +297,7 @@ export function updateMetadata(
297
297
metadata : Metadata
298
298
) : Promise < Metadata > {
299
299
metadataValidator ( metadata ) ;
300
- ref . throwIfRoot_ ( 'updateMetadata' ) ;
300
+ ref . _throwIfRoot ( 'updateMetadata' ) ;
301
301
return ref . service . getAuthToken ( ) . then ( authToken => {
302
302
const requestInfo = requests . updateMetadata (
303
303
ref . service ,
@@ -315,7 +315,7 @@ export function updateMetadata(
315
315
* URL for this object.
316
316
*/
317
317
export function getDownloadURL ( ref : Reference ) : Promise < string > {
318
- ref . throwIfRoot_ ( 'getDownloadURL' ) ;
318
+ ref . _throwIfRoot ( 'getDownloadURL' ) ;
319
319
return ref . service . getAuthToken ( ) . then ( authToken => {
320
320
const requestInfo = requests . getDownloadUrl (
321
321
ref . service ,
@@ -341,7 +341,7 @@ export function getDownloadURL(ref: Reference): Promise<string> {
341
341
* @returns A promise that resolves if the deletion succeeds.
342
342
*/
343
343
export function deleteObject ( ref : Reference ) : Promise < void > {
344
- ref . throwIfRoot_ ( 'deleteObject' ) ;
344
+ ref . _throwIfRoot ( 'deleteObject' ) ;
345
345
return ref . service . getAuthToken ( ) . then ( authToken => {
346
346
const requestInfo = requests . deleteObject ( ref . service , ref . location ) ;
347
347
return ref . service . makeRequest ( requestInfo , authToken ) . getPromise ( ) ;
0 commit comments