Skip to content

Commit ae1c345

Browse files
committed
Add comments
1 parent b6e0ffd commit ae1c345

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

packages/storage/src/service.ts

+13-6
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@ export function useStorageEmulator(
147147
*/
148148
export class StorageService implements _FirebaseService {
149149
_bucket: Location | null = null;
150+
/**
151+
* This string can be in the formats:
152+
* - host
153+
* - host:port
154+
* - protocol://host:port
155+
*/
150156
private _host: string = DEFAULT_HOST;
151157
protected readonly _appId: string | null = null;
152158
private readonly _requests: Set<Request<unknown>>;
@@ -179,15 +185,16 @@ export class StorageService implements _FirebaseService {
179185
}
180186

181187
/**
182-
* Set host:port string for this service.
183-
* @param origin - Origin string in the form of http://[host]:[port]
188+
* Set host string for this service.
189+
* @param host - host string in the form of host, host:port,
190+
* or protocol://host:port
184191
*/
185-
set host(origin: string) {
186-
this._host = origin;
192+
set host(host: string) {
193+
this._host = host;
187194
if (this._url != null) {
188-
this._bucket = Location.makeFromBucketSpec(this._url, origin);
195+
this._bucket = Location.makeFromBucketSpec(this._url, host);
189196
} else {
190-
this._bucket = extractBucket(origin, this.app.options);
197+
this._bucket = extractBucket(host, this.app.options);
191198
}
192199
}
193200

0 commit comments

Comments
 (0)